|
@@ -110,14 +110,14 @@ public class AuthOrgTreeServiceImpl implements IAuthOrgTreeService {
|
|
|
|
|
|
treeNods.forEach(e->{
|
|
|
List<AuthOrgInfo> list = childIdGroup.get(e.getId());
|
|
|
- List<String> collect = list.stream()
|
|
|
- .sorted(Comparator.comparing(AuthOrgInfo::getSort,
|
|
|
- Comparator.nullsLast(Integer::compareTo)))
|
|
|
- .map(AuthOrgInfo::getId).collect(Collectors.toList());
|
|
|
- if(CollectionUtils.isEmpty(collect)) {
|
|
|
+ if(CollectionUtils.isEmpty(list)) {
|
|
|
e.setIsParent(false);
|
|
|
e.setChildIds(Collections.emptyList());
|
|
|
} else {
|
|
|
+ List<String> collect = list.stream()
|
|
|
+ .sorted(Comparator.comparing(AuthOrgInfo::getSort,
|
|
|
+ Comparator.nullsLast(Integer::compareTo)))
|
|
|
+ .map(AuthOrgInfo::getId).collect(Collectors.toList());
|
|
|
e.setIsParent(true);
|
|
|
e.setChildIds(collect);
|
|
|
}
|