项目库--列表查询
This commit is contained in:
+6
@@ -481,6 +481,12 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
List<ProjectLibraryBase> children = result.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getParentId()) && projectLibraryBase.getId().equals(e.getParentId())).collect(Collectors.toList());
|
||||
if(children.size() != 0){
|
||||
//子项目的基础上添加的子项目
|
||||
List<String> childrenIdList = children.stream().map(ProjectLibraryBase::getId).distinct().collect(Collectors.toList());
|
||||
List<ProjectLibraryBase> childrenList = result.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getParentId()) && childrenIdList.contains(e.getParentId())).collect(Collectors.toList());
|
||||
children.addAll(childrenList);
|
||||
|
||||
//按版本排序
|
||||
Collections.sort(children);
|
||||
projectLibraryBase.setChildren(children);
|
||||
|
||||
Reference in New Issue
Block a user