|
@@ -574,7 +574,6 @@ public class AppFunInfoService extends BaseService<AppFunInfo, String> implement
|
|
|
Map<String, List<AppFunInfo>> funAppIdMap) {
|
|
|
List<AppFunInfo> list = new ArrayList<>();
|
|
|
for (Map.Entry<String, List<AppFunInfo>> entry : funAppIdMap.entrySet()) {
|
|
|
- StopWatch stopWatch = new StopWatch("getTreeNeedFuns");
|
|
|
List<AppFunInfo> funInfos = entry.getValue();
|
|
|
Map<String, AppFunInfo> funCodeMap = funInfos.stream()
|
|
|
.collect(Collectors.toMap(AppFunInfo::getCode, item -> item, (old, last) -> last));
|
|
@@ -583,7 +582,6 @@ public class AppFunInfoService extends BaseService<AppFunInfo, String> implement
|
|
|
.filter(e -> StringUtils.isNotBlank(e.getParentId())).map(AppFunInfo::getParentId)
|
|
|
.collect(Collectors.toSet());
|
|
|
//选择 排除已存在的功能id后的最底层的功能节点
|
|
|
- stopWatch.start("1");
|
|
|
List<AppFunInfo> bottomFuns = funInfos.stream()
|
|
|
.filter(item -> !existFunIds.contains(item.getId()) && !parentCodeSet.contains(item.getCode()))
|
|
|
.collect(Collectors.toList());
|
|
@@ -600,8 +598,6 @@ public class AppFunInfoService extends BaseService<AppFunInfo, String> implement
|
|
|
.filter(StringUtils::isNotBlank)
|
|
|
.collect(Collectors.toSet());
|
|
|
HashSet<String> codes = new HashSet<>();
|
|
|
- stopWatch.stop();
|
|
|
- stopWatch.start("2");
|
|
|
while (pCodeSet.size()>0) {
|
|
|
for (String code : pCodeSet) {
|
|
|
AppFunInfo appFunInfo = funCodeMap.get(code);
|
|
@@ -617,8 +613,6 @@ public class AppFunInfoService extends BaseService<AppFunInfo, String> implement
|
|
|
pCodeSet = codes;
|
|
|
codes.clear();
|
|
|
}
|
|
|
- stopWatch.stop();
|
|
|
- logger.debug("stop watch time cost:{}", stopWatch.prettyPrint());
|
|
|
}
|
|
|
return list;
|
|
|
}
|