修复权限接口报错

This commit is contained in:
TinyAnts 2022-04-20 11:35:15 +08:00
parent bfe604332e
commit e0210f6a60
1 changed files with 11 additions and 9 deletions

View File

@ -141,6 +141,7 @@ public class SystemAdminServiceImpl implements ISystemAdminService {
List<String> auths = new LinkedList<>(); List<String> auths = new LinkedList<>();
if (adminId > 1) { if (adminId > 1) {
List<Integer> menuIds = iSystemRoleMenuService.selectMenuIdsByRoleId(sysAdmin.getRole()); List<Integer> menuIds = iSystemRoleMenuService.selectMenuIdsByRoleId(sysAdmin.getRole());
if (menuIds.size() > 0) {
List<SystemMenu> systemMenus = systemMenuMapper.selectList(new QueryWrapper<SystemMenu>() List<SystemMenu> systemMenus = systemMenuMapper.selectList(new QueryWrapper<SystemMenu>()
.eq("is_disable", 0) .eq("is_disable", 0)
.in("id", menuIds) .in("id", menuIds)
@ -153,6 +154,7 @@ public class SystemAdminServiceImpl implements ISystemAdminService {
auths.add(item.getPerms().trim()); auths.add(item.getPerms().trim());
} }
} }
}
} else { } else {
auths.add("*"); auths.add("*");
} }