From 1337f249608bcbd7ad6cf244870e560a95821727 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期二, 12 十一月 2024 11:30:11 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/MenuServiceImpl.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 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 d3c0c46..1497663 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 @@ -158,8 +158,10 @@ @Override public List<MenuDO> getAppMenuListByTenant(MenuListReqVO reqVO) { + // 获取 tenantId + Long tenantId = getTenantId(); // 查询所有菜单,并过滤掉关闭的节点 - List<MenuDO> menus = getAppMenuList(reqVO); + List<MenuDO> menus = getAppMenuList(tenantId, reqVO); // 开启多租户的情况下,需要过滤掉未开通的菜单 tenantService.handleTenantMenu(menuIds -> menus.removeIf(menu -> !CollUtil.contains(menuIds, menu.getId()))); return menus; @@ -215,9 +217,7 @@ } @Override - public List<MenuDO> getAppMenuList(MenuListReqVO reqVO) { - // 获取 tenantId - Long tenantId = getTenantId(); + public List<MenuDO> getAppMenuList(Long tenantId, MenuListReqVO reqVO) { List<MenuDO> menuDOS = menuMapper.selectAppMenuList(tenantId, reqVO); Set<Long> menuDOIds = menuDOS.stream().map(MenuDO::getId).collect(Collectors.toSet()); // 获得角色列表 -- Gitblit v1.9.3