Browse Source

解决lambda排序问题

yucheng 3 years ago
parent
commit
7e08eb0d06

+ 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();