From b482efaf698d5fd3920ff63ccde1c819f9eb34ba Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期四, 26 十二月 2024 16:50:12 +0800 Subject: [PATCH] 修改菜单报错bug --- iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/MenuServiceImpl.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/MenuServiceImpl.java b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/MenuServiceImpl.java index ea51802..5f32ec2 100644 --- a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/MenuServiceImpl.java +++ b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/MenuServiceImpl.java @@ -27,6 +27,7 @@ import com.iailab.module.system.service.tenant.TenantPackageService; import com.iailab.module.system.service.tenant.TenantService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; @@ -126,7 +127,7 @@ //菜单归属租户和应用 Long tenantId = getTenantId(); AppDO appDO = appService.getAppByTenantId(tenantId); - if(appDO.getTenantId() != 1) { + if(ObjectUtils.isNotEmpty(appDO) && appDO.getTenantId() != 1) { updateObj.setTenantId(tenantId); updateObj.setAppId(appDO.getId()); } -- Gitblit v1.9.3