Quellcode durchsuchen

ICSS获取静态知识接口优化

wangyu vor 6 Jahren
Ursprung
Commit
dc39aa2528
1 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen
  1. 8 6
      aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java

+ 8 - 6
aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -268,12 +268,14 @@ public class ConceptFacade extends ConceptServiceImpl {
         ExistListByConceptIdsVO existListByConceptIdsVO = new ExistListByConceptIdsVO();
         existListByConceptIdsVO.setConceptIds(cenceptIdList);
         List<Long> existConceptIdList = conceptDetailFacade.existListByConceptIds(existListByConceptIdsVO);
-        for (RetrievalDTO retrievalDTOInfo : retrievalDTOS) {
-            for (Long concept : existConceptIdList) {
-                if (retrievalDTOInfo.getConceptId().intValue() == concept.intValue()){
-                    retrievalDTO = new RetrievalDTO();
-                    BeanUtil.copyProperties(retrievalDTOInfo,retrievalDTO);
-                    staticRetrievalList.add(retrievalDTO);
+        if(ListUtil.isNotEmpty(existConceptIdList)){
+            for (RetrievalDTO retrievalDTOInfo : retrievalDTOS) {
+                for (Long concept : existConceptIdList) {
+                    if (retrievalDTOInfo.getConceptId().intValue() == concept.intValue()){
+                        retrievalDTO = new RetrievalDTO();
+                        BeanUtil.copyProperties(retrievalDTOInfo,retrievalDTO);
+                        staticRetrievalList.add(retrievalDTO);
+                    }
                 }
             }
         }