【7.1.6】更新左侧菜单的非空判断

pull/23/head
fengshuonan 2021-12-07 15:21:55 +08:00
parent c46343cc17
commit 88d3cabf8a
1 changed files with 2 additions and 3 deletions

View File

@ -44,7 +44,6 @@ import cn.stylefeng.roses.kernel.system.api.MenuServiceApi;
import cn.stylefeng.roses.kernel.system.api.RoleServiceApi; import cn.stylefeng.roses.kernel.system.api.RoleServiceApi;
import cn.stylefeng.roses.kernel.system.api.exception.SystemModularException; import cn.stylefeng.roses.kernel.system.api.exception.SystemModularException;
import cn.stylefeng.roses.kernel.system.api.exception.enums.menu.SysMenuExceptionEnum; import cn.stylefeng.roses.kernel.system.api.exception.enums.menu.SysMenuExceptionEnum;
import cn.stylefeng.roses.kernel.system.api.exception.enums.user.SysUserExceptionEnum;
import cn.stylefeng.roses.kernel.system.api.pojo.menu.MenuAndButtonTreeResponse; import cn.stylefeng.roses.kernel.system.api.pojo.menu.MenuAndButtonTreeResponse;
import cn.stylefeng.roses.kernel.system.api.pojo.menu.SysMenuRequest; import cn.stylefeng.roses.kernel.system.api.pojo.menu.SysMenuRequest;
import cn.stylefeng.roses.kernel.system.api.pojo.menu.antd.AntdMenuSelectTreeNode; import cn.stylefeng.roses.kernel.system.api.pojo.menu.antd.AntdMenuSelectTreeNode;
@ -482,7 +481,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
// 非超级管理员获取当前用户所有的菜单id // 非超级管理员获取当前用户所有的菜单id
List<Long> menuIdList = getCurrentUserMenuIds(); List<Long> menuIdList = getCurrentUserMenuIds();
if (menuIdList.isEmpty()) { if (menuIdList.isEmpty()) {
throw new SystemModularException(SysUserExceptionEnum.USER_NOT_HAVE_MENUS); return new ArrayList<>();
} }
queryWrapper.in(SysMenu::getMenuId, menuIdList); queryWrapper.in(SysMenu::getMenuId, menuIdList);