| | |
| | | if (CollUtil.isEmpty(roleIds)) { |
| | | return Collections.emptySet(); |
| | | } |
| | | |
| | | // 获取 tenantId |
| | | Long tenantId = getTenantId(); |
| | | // 如果是管理员的情况下,获取全部应用菜单编号 |
| | | if (roleService.hasAnySuperAdmin(roleIds)) { |
| | | MenuListReqVO reqVO = new MenuListReqVO(); |
| | | return convertSet(menuService.getAppMenuList(reqVO), MenuDO::getId); |
| | | return convertSet(menuService.getAppMenuList(tenantId, reqVO), MenuDO::getId); |
| | | } |
| | | // 如果是非管理员的情况下,获得拥有的应用菜单编号 |
| | | // 获取 tenantId |
| | | Long tenantId = getTenantId(); |
| | | TenantDO tenant = tenantService.getTenant(tenantId); |
| | | TenantPackageDO tenantPackage = tenantPackageService.getTenantPackage(tenant.getPackageId()); |
| | | Set<Long> menuIds = tenantPackage.getMenuIds(); |