Browse Source

超级API日志调用

2024年8月7日12:55:35
thing_master
lishuai 1 year ago
parent
commit
af7efc17e1
  1. 4
      modules/thing/src/main/java/com/thing/thing/dict/service/impl/IotThingDictServiceImpl.java

4
modules/thing/src/main/java/com/thing/thing/dict/service/impl/IotThingDictServiceImpl.java

@ -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());

Loading…
Cancel
Save