Browse Source

组模型更新信息

2024年8月12日10:40:56
thing_master
lishuai 1 year ago
parent
commit
28ac45ce7c
  1. 7
      modules/thing/src/main/java/com/thing/thing/group/service/impl/IotGroupInfoServiceImpl.java

7
modules/thing/src/main/java/com/thing/thing/group/service/impl/IotGroupInfoServiceImpl.java

@ -440,13 +440,6 @@ public class IotGroupInfoServiceImpl extends BaseServiceImpl<IotGroupInfoMapper,
if (GroupTypeEnum.noneMatch(type)) {
throw new SysException("组类型不正确");
}
//如果组已经绑定字典&物实体&物模板,不让其修改组类型
//List<IotThingDictEntity> thingDictEntities = dictService.findAllByGroupId(id);
List<IotGroupRelationEntity> groupRelationEntities = groupRelationService.findAllByGroupId(id);
if (/*(CollectionUtil.isNotEmpty(thingDictEntities) ||*/ CollectionUtil.isNotEmpty(groupRelationEntities))
/*&& !StringUtils.equals(groupInfoEntity.getType(), dto.getType()))*/ {
throw new SysException("当前组关联了字典或者物实体,不能修改组类型");
}
if (!UserContext.isAdmin() && ObjectUtil.equals(groupInfoEntity.getIsDefault(), IsDefaultEnum.Y.getValue())) {
throw new SysException("暂无修改系统默认组的权限");
}

Loading…
Cancel
Save