58582 问题知识库-问题分类、市场检索条件改为多选。

This commit is contained in:
wangzhijiang
2022-08-25 10:12:54 +08:00
parent 6a6e468380
commit a56244fca8
2 changed files with 14 additions and 11 deletions
@@ -92,7 +92,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
//如果展示权限是公开,则把该数据插入到搜索中心中。
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
}
// this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
}
/**
@@ -403,7 +403,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
//this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
}
// this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
}
/**
@@ -439,9 +439,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
this.problemKnowledgeBaseCommentEOService.remove(deleteWrapper);
// for (String problemKnowledgeBaseId : ids) {
// this.deleteElasticsearchData(problemKnowledgeBaseId);
// }
for (String problemKnowledgeBaseId : ids) {
this.deleteElasticsearchData(problemKnowledgeBaseId);
}
}
/**
@@ -41,10 +41,7 @@ import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -1186,9 +1183,15 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
mapHighlight1.put("fields",mapHighlight);
}
//封装问题类型选择框查询条件。
//封装问题类型选择框查询条件(类似于in条件)
if (StringUtils.isNotBlank(problem_type)) {
this.createQueryWhere(problem_type,"problem_type",queryMapJson,SearchEnum.INDEX_PROBLEM_KNOWLEDGE_BASE.getValue());
List<String> problemTypeList = Arrays.asList(problem_type.split(","));
Map<String, Object> problemTypeKeyMap = new HashMap<>();
Map<String, Object> problemTypeMatchMap = new HashMap<>();
problemTypeKeyMap.put("problem_type", problemTypeList);
problemTypeMatchMap.put("terms",problemTypeKeyMap);
queryMapJson.add(problemTypeMatchMap);
}
//封装市场选择框查询条件。