This commit is contained in:
zhangchenbiao
2023-06-29 15:40:41 +08:00
parent 20a1bc31bc
commit 07a19f12b3

View File

@@ -62,6 +62,10 @@ public class OpenAreaTreeVO {
node.setChildNode(childList); node.setChildNode(childList);
allTree.add(node); allTree.add(node);
} }
//不需要过滤 直接返回
if(StringUtils.isBlank(keyword) && (Objects.isNull(applyFlag) || !applyFlag)){
return allTree;
}
log.info("1#耗时:{}", System.currentTimeMillis() - startTime); log.info("1#耗时:{}", System.currentTimeMillis() - startTime);
Map<Long, List<OpenAreaTreeVO>> childMap = allTree.stream().collect(Collectors.toMap(k -> k.getId(), v -> v.getChildNode())); Map<Long, List<OpenAreaTreeVO>> childMap = allTree.stream().collect(Collectors.toMap(k -> k.getId(), v -> v.getChildNode()));
List<HyOpenAreaInfoDO> filterList = allOpenArea.stream().filter(o -> (StringUtils.isBlank(keyword) || o.getAreaPath().contains(keyword)) List<HyOpenAreaInfoDO> filterList = allOpenArea.stream().filter(o -> (StringUtils.isBlank(keyword) || o.getAreaPath().contains(keyword))