소스 검색

解决lambda排序问题

yucheng 3 년 전
부모
커밋
7e08eb0d06
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      src/main/java/com/persagy/proxy/adm/service/impl/AdmDictServiceImpl.java

+ 6 - 2
src/main/java/com/persagy/proxy/adm/service/impl/AdmDictServiceImpl.java

@@ -360,11 +360,15 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
         admObjectInfos = sortFuncidForEdit(admObjectInfos);
         //查询平台级信息点采集信息
         List<ObjectInfoCollect> commonObjectInfoCollect = queryObjectInfoCollect(context, "common", request.getType(), clazz);
-        Map<String, Boolean> commonObjectInfoCollectMap = commonObjectInfoCollect.stream().filter(item -> StrUtil.isNotEmpty(item.getDefineInfoId())).collect(Collectors.toMap(ObjectInfoCollect::getDefineInfoId,ObjectInfoCollect::getVisiable));
+        Map<String, Boolean> commonObjectInfoCollectMap = commonObjectInfoCollect.stream().filter(item ->
+                StrUtil.isNotEmpty(item.getDefineInfoId())).collect(
+                        Collectors.toMap(ObjectInfoCollect::getDefineInfoId,ObjectInfoCollect::getVisiable,(k1,k2)->k1));
 
         //查询项目级信息点采集信息
         List<ObjectInfoCollect> projectObjectInfoCollect = queryObjectInfoCollect(context, "project", request.getType(), clazz);
-        Map<String, Boolean> projectObjectInfoCollectMap = projectObjectInfoCollect.stream().filter(item -> StrUtil.isNotEmpty(item.getDefineInfoId())).collect(Collectors.toMap(ObjectInfoCollect::getDefineInfoId,ObjectInfoCollect::getVisiable));
+        Map<String, Boolean> projectObjectInfoCollectMap = projectObjectInfoCollect.stream().filter(item ->
+                StrUtil.isNotEmpty(item.getDefineInfoId())).collect(
+                        Collectors.toMap(ObjectInfoCollect::getDefineInfoId,ObjectInfoCollect::getVisiable,(k1,k2)->k1));
 
         String dictType = request.getDictType();