Commit 5aeb7dcc by 罗志长

fix: 过滤禁用角色的菜单

parent fa770d13
...@@ -571,6 +571,12 @@ public class PlatUserServiceImpl extends ServiceImpl<PlatUserMapper, PlatUser> ...@@ -571,6 +571,12 @@ public class PlatUserServiceImpl extends ServiceImpl<PlatUserMapper, PlatUser>
roleIdList.add(-1 + ""); roleIdList.add(-1 + "");
roleIdList = platRoleService.list(new QueryWrapper<PlatRole>().lambda()
.eq(PlatRole::getStatus, CommonEnum.YES.getValue())
.in(PlatRole::getId, roleIdList))
.stream().map(PlatRole::getId)
.collect(Collectors.toList());
List<PlatRoleMenu> roleMenuList = platRoleMenuService.list(new QueryWrapper<PlatRoleMenu>().lambda() List<PlatRoleMenu> roleMenuList = platRoleMenuService.list(new QueryWrapper<PlatRoleMenu>().lambda()
.in(PlatRoleMenu::getRoleId, roleIdList)); .in(PlatRoleMenu::getRoleId, roleIdList));
List<String> menuIdList = StreamUtil.map(roleMenuList, PlatRoleMenu::getMenuId); List<String> menuIdList = StreamUtil.map(roleMenuList, PlatRoleMenu::getMenuId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment