Browse Source

医学知识检索结果截取前100个

zhaops 4 years ago
parent
commit
b8aaea4914
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/main/java/com/diagbot/facade/ConceptInfoFacade.java

+ 3 - 0
src/main/java/com/diagbot/facade/ConceptInfoFacade.java

@@ -125,6 +125,9 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
         RespDTOUtil.respNGDealCover(respDTO, "检索失败");
         RespDTOUtil.respNGDealCover(respDTO, "检索失败");
         staticKnowledgeIndexDTOList = respDTO.data;
         staticKnowledgeIndexDTOList = respDTO.data;
         if (ListUtil.isNotEmpty(staticKnowledgeIndexDTOList)) {
         if (ListUtil.isNotEmpty(staticKnowledgeIndexDTOList)) {
+            if (staticKnowledgeIndexDTOList.size() > 100) {
+                staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList.subList(0, 100);
+            }
             //typeName转换
             //typeName转换
             staticKnowledgeIndexDTOList.forEach(item -> {
             staticKnowledgeIndexDTOList.forEach(item -> {
                 item.setTypeName(convertTypeName(item.getTypeName(), 2, dicTypeMappingList));
                 item.setTypeName(convertTypeName(item.getTypeName(), 2, dicTypeMappingList));