This commit is contained in:
caozehui
2024-12-02 13:13:49 +08:00
parent 7335ffe445
commit 37aba2181b
6 changed files with 20 additions and 4 deletions

View File

@@ -158,9 +158,6 @@ public class SysFunctionServiceImpl extends ServiceImpl<SysFunctionMapper, SysFu
}
/**
* 根据当前分类找出子类,递归找出子类的子类
*/
private <T extends SysFunction> List<SysFunction> getChildrenList(T currMenu, List<? extends SysFunction> categories) {
return categories.stream().filter(o -> Objects.equals(o.getPid(), currMenu.getId())).peek(o -> o.setChildren(getChildrenList(o, categories))).sorted(Comparator.comparingInt(SysFunction::getSort)).collect(Collectors.toList());
}