润阳项目
新增相关字段和判断
This commit is contained in:
parent
f0aa4ec5ac
commit
225f5d2d81
@ -85,9 +85,12 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
||||
SysIotModelVo sysIotModelQuery = sysIotModelMapper.selectIotModelByCode(sysIotModelDto.getIotModelCode());
|
||||
if (!(sysIotModelQuery == null)){
|
||||
if(!(sysIotModelQuery.getId().equals(sysIotModelDto.getId()))){
|
||||
throw new ServiceException("物模型code已经存在");
|
||||
throw new ServiceException("物模型code已经存在!");
|
||||
}
|
||||
|
||||
}
|
||||
SysIotModel oldSysIotModel = sysIotModelMapper.selectById(sysIotModelDto.getId());
|
||||
if(!sysIotModelDto.getIotModelCode().equals(oldSysIotModel.getIotModelCode())) {
|
||||
throw new ServiceException("物模型code不能修改!");
|
||||
}
|
||||
sysIotModel.setUpdatedTime(new Date());
|
||||
sysIotModel.setUpdatedBy(sysUserVo.getAccount());
|
||||
|
Loading…
Reference in New Issue
Block a user