Browse Source

回滚

tags/24080901
niohe·erbao 1 year ago
parent
commit
596092dd26
1 changed files with 4 additions and 8 deletions
  1. +4
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java

+ 4
- 8
pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java View File

@@ -137,15 +137,11 @@ public final class TreeUtil {
List<MenuRoleVO> menus;
if (!parentId.equals(StrPool.DEF_PARENT_ID)) {
Map<MenuTypeEnum, List<MenuRoleVO>> group = CollUtils.group(currMenus, MenuRoleVO::getMenuType);
// for (MenuRoleVO vo : group.getOrDefault(MenuTypeEnum.BUTTON, Collections.emptyList())) {
// vo.setTopMenu(parentMenu.getTopMenu());
// parentIter.add(vo);
// }
menus = group.getOrDefault(MenuTypeEnum.MENU, Collections.emptyList());
List<MenuRoleVO> buttons = group.getOrDefault(MenuTypeEnum.BUTTON, Collections.emptyList());
if (CollUtil.isNotEmpty(buttons)) {
menus.addAll(buttons);
for (MenuRoleVO vo : group.getOrDefault(MenuTypeEnum.BUTTON, Collections.emptyList())) {
vo.setTopMenu(parentMenu.getTopMenu());
parentIter.add(vo);
}
menus = group.getOrDefault(MenuTypeEnum.MENU, Collections.emptyList());
} else {
menus = new ArrayList<>(currMenus);
}


Loading…
Cancel
Save