Commit 593cb454 authored by chenhao's avatar chenhao

删除并行流

parent ba307b78
...@@ -192,7 +192,6 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite ...@@ -192,7 +192,6 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
o.getBizOrgCode()); o.getBizOrgCode());
return menu; return menu;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
menuList.remove(null);
return buildTreeParallel(menuList); return buildTreeParallel(menuList);
} }
...@@ -202,7 +201,7 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite ...@@ -202,7 +201,7 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
Map<Long, OrgMenuDto> map = new HashMap<>(menuList.size()); Map<Long, OrgMenuDto> map = new HashMap<>(menuList.size());
menuList.forEach(e -> map.put(e.getKey(), e)); menuList.forEach(e -> map.put(e.getKey(), e));
Set<? extends Map.Entry<Long, ? extends OrgMenuDto>> entries = map.entrySet(); Set<? extends Map.Entry<Long, ? extends OrgMenuDto>> entries = map.entrySet();
entries.parallelStream().forEach(entry -> { entries.stream().forEach(entry -> {
OrgMenuDto value = entry.getValue(); OrgMenuDto value = entry.getValue();
if (value != null) { if (value != null) {
OrgMenuDto treeDto = map.get(value.getParentId()); OrgMenuDto treeDto = map.get(value.getParentId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment