Merge branch 'master' into docker_package
This commit is contained in:
commit
f45492ee70
|
@ -1898,48 +1898,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
@Override
|
||||
public List<Map> selectDevelopDoc() {
|
||||
//List<Map> result = new ArrayList<>();
|
||||
//List<Map<String, Object>> dtoMaps = baseDao.selectDevelopDocResource();
|
||||
//Map<String, List<Map<String, Object>>> resourceTypeMap = dtoMaps.stream().collect(Collectors.groupingBy(m -> m.get("type").toString()));
|
||||
//resourceTypeMap.forEach((key, value) -> {
|
||||
// if (!"组件服务".equals(key)) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("title", key);
|
||||
// map.put("children", value);
|
||||
// result.add(map);
|
||||
// }
|
||||
//});
|
||||
//if (resourceTypeMap.get("组件服务") != null) {
|
||||
// Map componentMap = new HashMap();
|
||||
// componentMap.put("title", "组件服务");
|
||||
// Map<String, List> map = new ConcurrentHashMap<>();
|
||||
// CompletableFuture.allOf(resourceTypeMap.get("组件服务").stream()
|
||||
// .map(it -> CompletableFuture.runAsync(() -> selectAttrsByResourceId(Long.parseLong(it.get("id").toString()))
|
||||
// .stream()
|
||||
// .filter(temp -> "组件类型".equals(temp.getAttrType()))
|
||||
// .forEach(attr -> {
|
||||
// if (map.get(attr.getAttrValue()) != null) {
|
||||
// map.get(attr.getAttrValue()).add(it);
|
||||
// } else {
|
||||
// map.put(attr.getAttrValue(), Collections.synchronizedList(new ArrayList() {{
|
||||
// add(it);
|
||||
// }}));
|
||||
// }
|
||||
// }), executor))
|
||||
// .collect(Collectors.toList())
|
||||
// .toArray(new CompletableFuture[resourceTypeMap.get("组件服务").size()]))
|
||||
// .join();
|
||||
// componentMap.put("children", map.entrySet().stream().map(it -> new HashMap() {{
|
||||
// put("title", it.getKey());
|
||||
// put("children", it.getValue());
|
||||
// }}).collect(Collectors.toList()));
|
||||
// result.add(componentMap);
|
||||
//}
|
||||
//return result;
|
||||
List<Map> result = new ArrayList<>();
|
||||
List<Map<String, Object>> dtoMaps = baseDao.selectDevelopDocResource();
|
||||
Map<String, List<Map<String, Object>>> resourceTypeMap = dtoMaps.stream().collect(Collectors.groupingBy(m -> m.get("type").toString()));
|
||||
resourceTypeMap.entrySet().stream().forEach(temp -> {
|
||||
resourceTypeMap.entrySet().stream().filter(index -> !"组件服务".equals(index.getKey())).forEach(temp -> {
|
||||
if (!"组件服务".equals(temp.getKey())) {
|
||||
Map map = new HashMap();
|
||||
map.put("title", temp.getKey());
|
||||
|
@ -1947,7 +1909,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
result.add(map);
|
||||
}
|
||||
});
|
||||
if (resourceTypeMap.get("组件服务") != null) {
|
||||
if (resourceTypeMap.containsKey("组件服务") && resourceTypeMap.get("组件服务") != null) {
|
||||
Map componentMap = new HashMap();
|
||||
componentMap.put("title", "组件服务");
|
||||
Map<String, List> map = new ConcurrentHashMap<>();
|
||||
|
|
Loading…
Reference in New Issue