|
@@ -88,6 +88,9 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
|
.stream()
|
|
|
.filter(i -> i.getHasInfo().equals(1))
|
|
|
.collect(Collectors.toList());
|
|
|
+ if (staticKnowledgeIndexDTOList.size() > 100) {
|
|
|
+ staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList.subList(0, 100);
|
|
|
+ }
|
|
|
return staticKnowledgeIndexDTOList;
|
|
|
}
|
|
|
|
|
@@ -104,6 +107,9 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
|
.stream()
|
|
|
.filter(i -> i.getHasInfo().equals(0))
|
|
|
.collect(Collectors.toList());
|
|
|
+ if (staticKnowledgeIndexDTOList.size() > 100) {
|
|
|
+ staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList.subList(0, 100);
|
|
|
+ }
|
|
|
return staticKnowledgeIndexDTOList;
|
|
|
}
|
|
|
|
|
@@ -125,9 +131,6 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
|
RespDTOUtil.respNGDealCover(respDTO, "检索失败");
|
|
|
staticKnowledgeIndexDTOList = respDTO.data;
|
|
|
if (ListUtil.isNotEmpty(staticKnowledgeIndexDTOList)) {
|
|
|
- if (staticKnowledgeIndexDTOList.size() > 100) {
|
|
|
- staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList.subList(0, 100);
|
|
|
- }
|
|
|
//typeName转换
|
|
|
staticKnowledgeIndexDTOList.forEach(item -> {
|
|
|
item.setTypeName(convertTypeName(item.getTypeName(), 2, dicTypeMappingList));
|
|
@@ -137,10 +140,28 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
|
.stream()
|
|
|
.map(i -> i.getName())
|
|
|
.collect(Collectors.toList());
|
|
|
+ List<ConceptInfo> conceptInfoList = Lists.newLinkedList();
|
|
|
QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
|
- conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("name", conNameList);
|
|
|
- List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
|
|
|
+ int n = 0;
|
|
|
+ do {
|
|
|
+ List<String> subConNameList = new ArrayList<>();
|
|
|
+ if (n + 1000 < conNameList.size()) {
|
|
|
+ subConNameList = conNameList.subList(n, n + 1000);
|
|
|
+ } else {
|
|
|
+ subConNameList = conNameList.subList(n, conNameList.size());
|
|
|
+ }
|
|
|
+ conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
|
+ conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+ conceptInfoQueryWrapper.in("name", subConNameList);
|
|
|
+ List<ConceptInfo> subConceptInfoList = this.list(conceptInfoQueryWrapper);
|
|
|
+ if (ListUtil.isNotEmpty(subConceptInfoList)) {
|
|
|
+ conceptInfoList.addAll(subConceptInfoList);
|
|
|
+ }
|
|
|
+ n += 1000;
|
|
|
+ } while (conceptInfoList.size() < 100 && n < conNameList.size());
|
|
|
+
|
|
|
+ staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList.subList(0, n);
|
|
|
+
|
|
|
if (ListUtil.isNotEmpty(conceptInfoList)) {
|
|
|
//typeName转换
|
|
|
conceptInfoList.forEach(item -> {
|