mirror of https://gitee.com/stylefeng/roses
【8.0】【sys】【role】修复一个权限的问题
parent
ffc00579e9
commit
a4264db3c1
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue