|
|
@@ -137,11 +137,15 @@ 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); |
|
|
|
} |
|
|
|
// 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); |
|
|
|
} |
|
|
|
} else { |
|
|
|
menus = new ArrayList<>(currMenus); |
|
|
|
} |
|
|
|