|
|
|
@ -337,10 +337,10 @@ public class IotThingDictServiceImpl extends BaseServiceImpl<IotThingDictMapper, |
|
|
|
Boolean admin = UserContext.isAdmin(); |
|
|
|
Long tenantCode = SecurityUser.getUser().getTenantCode(); |
|
|
|
Long realTenantCode = UserContext.getRealTenantCode(); |
|
|
|
if(ObjectUtil.equals(dto.getIsDefault(), IsDefaultEnum.Y.getValue()) && admin && !Objects.equals(tenantCode,realTenantCode)){ |
|
|
|
if(ObjectUtil.equals(iotThingDictEntity.getIsDefault(), IsDefaultEnum.Y.getValue()) && admin && !Objects.equals(tenantCode,realTenantCode)){ |
|
|
|
throw new SysException("当前切换用户无权增加系统默认字典,请切换到admin用户处理"); |
|
|
|
} |
|
|
|
if (ObjectUtil.equals(dto.getIsDefault(), IsDefaultEnum.Y.getValue()) && !admin) { |
|
|
|
if (ObjectUtil.equals(iotThingDictEntity.getIsDefault(), IsDefaultEnum.Y.getValue()) && !admin) { |
|
|
|
throw new SysException("用户无权修改系统默认字典"); |
|
|
|
} |
|
|
|
String url = BizUtils.trimAll(dto.getUrl()); |
|
|
|
|