【8.0】【sys】【role】修复一个权限的问题

pull/57/head
fengshuonan 2023-09-13 11:27:53 +08:00
parent ffc00579e9
commit a4264db3c1
1 changed files with 6 additions and 4 deletions

View File

@ -159,12 +159,14 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
@Override
public List<SysMenu> getTotalMenus(Set<Long> limitMenuIds) {
if (ObjectUtil.isEmpty(limitMenuIds)) {
return new ArrayList<>();
}
LambdaQueryWrapper<SysMenu> menuLambdaQueryWrapper = new LambdaQueryWrapper<>();
menuLambdaQueryWrapper.select(SysMenu::getMenuId, SysMenu::getMenuName, SysMenu::getMenuParentId, SysMenu::getAppId);
menuLambdaQueryWrapper.in(SysMenu::getMenuId, limitMenuIds);
// 如果限制菜单不为空则根据限制菜单id进行筛选否则查询所有菜单
if (ObjectUtil.isNotEmpty(limitMenuIds)) {
menuLambdaQueryWrapper.in(SysMenu::getMenuId, limitMenuIds);
}
menuLambdaQueryWrapper.orderByAsc(SysMenu::getMenuSort);
return this.list(menuLambdaQueryWrapper);
}