58582 问题知识库-问题分类、市场检索条件改为多选。
This commit is contained in:
+5
-5
@@ -92,7 +92,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
//如果展示权限是公开,则把该数据插入到搜索中心中。
|
//如果展示权限是公开,则把该数据插入到搜索中心中。
|
||||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||||
}
|
}
|
||||||
// this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -403,7 +403,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
//this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
|
//this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -439,9 +439,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
|
|
||||||
this.problemKnowledgeBaseCommentEOService.remove(deleteWrapper);
|
this.problemKnowledgeBaseCommentEOService.remove(deleteWrapper);
|
||||||
|
|
||||||
// for (String problemKnowledgeBaseId : ids) {
|
for (String problemKnowledgeBaseId : ids) {
|
||||||
// this.deleteElasticsearchData(problemKnowledgeBaseId);
|
this.deleteElasticsearchData(problemKnowledgeBaseId);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+9
-6
@@ -41,10 +41,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1186,9 +1183,15 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
mapHighlight1.put("fields",mapHighlight);
|
mapHighlight1.put("fields",mapHighlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
//封装问题类型选择框查询条件。
|
//封装问题类型选择框查询条件(类似于in条件)。
|
||||||
if (StringUtils.isNotBlank(problem_type)) {
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
//封装市场选择框查询条件。
|
//封装市场选择框查询条件。
|
||||||
|
|||||||
Reference in New Issue
Block a user