润阳项目
新增相关字段和判断
This commit is contained in:
parent
81b850522d
commit
db405cb285
@ -83,8 +83,11 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
||||
SysUserVo sysUserVo = (SysUserVo) StpUtil.getTokenSession().get(SessionUtil.SESSION_USER_KEY);
|
||||
|
||||
SysIotModelVo sysIotModelQuery = sysIotModelMapper.selectIotModelByCode(sysIotModelDto.getIotModelCode());
|
||||
if (!(Long.valueOf(sysIotModelQuery.getId()) == Long.valueOf(sysIotModelDto.getId())) && !(sysIotModelQuery == null)) {
|
||||
throw new ServiceException("物模型code已经存在");
|
||||
if (!(sysIotModelQuery == null)){
|
||||
if(!(sysIotModelQuery.getId().equals(sysIotModelDto.getId()))){
|
||||
throw new ServiceException("物模型code已经存在");
|
||||
}
|
||||
|
||||
}
|
||||
sysIotModel.setUpdatedTime(new Date());
|
||||
sysIotModel.setUpdatedBy(sysUserVo.getAccount());
|
||||
|
Loading…
Reference in New Issue
Block a user