| | |
| | | |
| | | @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; |
| | |
| | | } |
| | | |
| | | @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()); |
| | | // 获得角色列表 |