文档库--搜索中心

This commit is contained in:
zhn
2022-03-15 14:11:28 +08:00
parent 0341253473
commit 0d5e247642
3 changed files with 6 additions and 8 deletions
@@ -65,13 +65,11 @@ public class DocumentSearchController {
@ApiOperation(value="列表查询", notes="列表查询") @ApiOperation(value="列表查询", notes="列表查询")
@GetMapping(value = "/getInfoList") @GetMapping(value = "/getInfoList")
public Result<?> getInfoList(@RequestParam(name="indexName",required=true) String indexName, public Result<?> getInfoList(@RequestParam(name="map",required=false) Map<String,Object> map) {
@RequestParam(name="typeName",required=true) String typeName,
@RequestParam(name="map",required=false) Map<String,Object> map) {
map =new HashMap<>(); map =new HashMap<>();
// map.put("_source","serial_number"); // map.put("_source","serial_number");
// map.put("_source","implement_time"); // map.put("_source","implement_time");
JSONObject infoList = iDocumentSearchService.getInfoList(indexName, typeName, map); JSONObject infoList = iDocumentSearchService.getInfoList(map);
return Result.OK(infoList); return Result.OK(infoList);
} }
} }
@@ -54,7 +54,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
} }
@Override @Override
public JSONObject getInfoList(String indexName, String typeName, Map<String,Object> map) { public JSONObject getInfoList(Map<String,Object> map) {
//文档库所有的字段 //文档库所有的字段
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue()); List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
//需要查询的列表字段 //需要查询的列表字段
@@ -120,8 +120,8 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
} }
} }
indexName = "documentLibrary"; String indexName = "documentLibrary";
typeName = "document"; String typeName = "document";
// String json = JSON.toJSONString(map);//map转String // String json = JSON.toJSONString(map);//map转String
// JSONObject queryObject = JSON.parseObject(json); // JSONObject queryObject = JSON.parseObject(json);
@@ -16,6 +16,6 @@ public interface IDocumentSearchService {
List<Map<String, Object>> getHeader(String flag, String cut,String searchFla); List<Map<String, Object>> getHeader(String flag, String cut,String searchFla);
JSONObject getInfoList(String indexName, String typeName, Map<String,Object> map); JSONObject getInfoList(Map<String,Object> map);
} }