菜单权限过滤逻辑调整,取消仅按权限过滤
This commit is contained in:
@@ -37,8 +37,9 @@ public class MenuServiceImpl implements MenuService {
|
||||
public List<MenuTreeVO> getUserMenus(String userId, String roleId) {
|
||||
List<SysMenuDO> menuList= sysMenuDAO.selectMenuAll(null);
|
||||
List<SysRoleMenuDO> roleMenuList = sysRoleMenuDAO.getRoleMenuByRoleId(roleId);
|
||||
List<Long> anthMenuIdList = menuList.stream().filter(o -> MenuTypeEnum.AUTH.getCode().equals(o.getMenuType())).map(SysMenuDO::getId).collect(Collectors.toList());
|
||||
List<Long> roleMenuIdList = roleMenuList.stream().map(SysRoleMenuDO::getMenuId).filter(anthMenuIdList::contains).collect(Collectors.toList());
|
||||
/*List<Long> anthMenuIdList = menuList.stream().filter(o -> MenuTypeEnum.AUTH.getCode().equals(o.getMenuType())).map(SysMenuDO::getId).collect(Collectors.toList());
|
||||
List<Long> roleMenuIdList = roleMenuList.stream().map(SysRoleMenuDO::getMenuId).filter(anthMenuIdList::contains).collect(Collectors.toList());*/
|
||||
List<Long> roleMenuIdList = roleMenuList.stream().map(SysRoleMenuDO::getMenuId).collect(Collectors.toList());
|
||||
Set<Long> authMenuSet = new HashSet<>();
|
||||
//1倒推菜单列表 2.转换成树`
|
||||
if (CollectionUtils.isEmpty(roleMenuIdList)) {
|
||||
|
||||
Reference in New Issue
Block a user