Commit 9644f351 by 陈健智

原发追溯再调整

parent e5ca37fe
......@@ -3529,18 +3529,13 @@ public class MarkDataServiceImpl implements MarkDataService {
SearchHits hits = esClientDao.searchHits(indexes, query, null, null, sort, (page - 1) * pageSize, pageSize, null);
List<JSONObject> list = new ArrayList<>();
for (SearchHit hit : hits) {
JSONObject hitJson = new JSONObject(hit.getSourceAsMap());
JSONObject data = JSONObject.parseObject(JSONObject.toJSONString(new MarkFlowEntity(hitJson).getData()));
BaseMap baseMap = Tools.getBaseFromEsMap(hit.getSourceAsMap());
JSONObject jsonObject = new JSONObject();
jsonObject.put("platform", BeanTools.filterPlatform(GlobalPojo.PLATFORMS, hitJson.getIntValue(GenericAttribute.ES_C5), hitJson.getIntValue(GenericAttribute.ES_FOREIGN)).getName());
jsonObject.put("source", hitJson.getString(GenericAttribute.ES_SOURCE));
jsonObject.put("realSource", hitJson.getString(GenericAttribute.ES_REAL_SOURCE));
jsonObject.put("time", hitJson.getLongValue("time"));
String title = StringUtils.isNotBlank(Tools.getTitleWithContent(data.getString("title"), data.getString("content")))
? Tools.getTitleWithContent(data.getString("title"), data.getString("content"))
: Tools.getTitleWithContent(data.getString("questionTitle"), data.getString("questionContent"));
jsonObject.put("title", title);
jsonObject.put("url", data.getString("url"));
jsonObject.put("platform", baseMap.getPlatform());
jsonObject.put("source", baseMap.getSource());
jsonObject.put("realSource", baseMap.getRealSource());
jsonObject.put("title", baseMap.getTitle());
jsonObject.put("url", baseMap.getUrl());
list.add(jsonObject);
}
return PageVO.createPageVo(total, page, pageSize, list);
......@@ -3551,6 +3546,7 @@ public class MarkDataServiceImpl implements MarkDataService {
}
private BoolQueryBuilder getAllIndexSearchOriginQuery(MarkSearchDTO dto) {
dto.setEndTime(System.currentTimeMillis());
dto.setStartTime(dto.getEndTime() - Constant.ONE_MONTH);
// keyword
BoolQueryBuilder keywordQuery = QueryBuilders.boolQuery();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment