这种如何能写成一句?
List<Department> menuTree = allDepartment.stream().filter(p -> StringUtils.isBlank(p.getParentId())).collect(Collectors.toList()); menuTree.forEach(nav -> nav.setChildren(getTree(nav.getId(), allDepartment)));
List<Department> menuTree = allDepartment.stream().filter(p -> StringUtils.isBlank(p.getParentId())).collect(Collectors.toList()); menuTree.forEach(nav -> nav.setChildren(getTree(nav.getId(), allDepartment)));
2019-11-28
举报