From b8a0affd03b5fa9fa33cd6f870e90394c2df86c7 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 06 一月 2025 13:31:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/MenuController.java | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/MenuController.java b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/MenuController.java index 67553f1..9f85a00 100644 --- a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/MenuController.java +++ b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/MenuController.java @@ -21,7 +21,9 @@ import java.util.Comparator; import java.util.List; +import static com.iailab.framework.common.pojo.CommonResult.error; import static com.iailab.framework.common.pojo.CommonResult.success; +import static com.iailab.framework.tenant.core.context.TenantContextHolder.getTenantId; @Tag(name = "管理后台 - 菜单") @RestController @@ -96,7 +98,13 @@ @Operation(summary = "获取应用菜单列表", description = "用于【应用菜单】界面") @PreAuthorize("@ss.hasPermission('system:app-menu:query')") public CommonResult<List<MenuRespVO>> getAppMenuList(MenuListReqVO reqVO) { - List<MenuDO> list = menuService.getAppMenuList(reqVO); + // 获取 tenantId + Long tenantId = getTenantId(); + // 管理员租户不在此管理菜单 + if(tenantId == 1l) { + return error(-1, "管理员租户请在“菜单管理”中管理菜单!"); + } + List<MenuDO> list = menuService.getAppMenuList(tenantId, reqVO); list.sort(Comparator.comparing(MenuDO::getSort)); return success(BeanUtils.toBean(list, MenuRespVO.class)); } -- Gitblit v1.9.3