|
|
@ -95,7 +95,7 @@ public class SearchDataService extends CrudService<SentimentModify, SentimentRep |
|
|
|
} |
|
|
|
} |
|
|
|
/** |
|
|
|
* 遍历查询结果调用解析组装方法 2 |
|
|
|
* 遍历查询结果调用解析组装方法 2 用户信息的组装用的是这个方法!!! |
|
|
|
*/ |
|
|
|
private void parseQueryResult(List<JSONObject> dataList, List<ESMonitorEntity> esMonitorListEntity,Integer searchType) { |
|
|
|
try { |
|
|
@ -227,8 +227,8 @@ public class SearchDataService extends CrudService<SentimentModify, SentimentRep |
|
|
|
String icon = ""; |
|
|
|
String siteType = ""; |
|
|
|
if(enSource.equals(ESConstant.SINA)){ |
|
|
|
siteId = "183"; |
|
|
|
}else { |
|
|
|
siteId = "183"; // 微博的,我忘了为啥这个需要特殊处理。。。 |
|
|
|
}else if(siteMap.containsKey(enSource)){ |
|
|
|
Map<String, Object> siteOtherMap = siteMap.get(enSource); |
|
|
|
if (siteOtherMap.containsKey("site_id")) { |
|
|
|
siteId = siteMap.get(enSource).get("site_id").toString(); |
|
|
@ -261,6 +261,7 @@ public class SearchDataService extends CrudService<SentimentModify, SentimentRep |
|
|
|
price = sourceAsMap.get(ESConstant.PRICE).toString(); |
|
|
|
attitudeCount = sourceAsMap.get(ESConstant.POSTCOUNT).toString(); |
|
|
|
} else if(searchType == 2){ |
|
|
|
author = sourceAsMap.get(ESConstant.AUTHOR).toString(); |
|
|
|
content = productParameter; |
|
|
|
}else { |
|
|
|
content = sourceAsMap.get(ESConstant.CONTENT).toString(); |
|
|
@ -356,12 +357,22 @@ public class SearchDataService extends CrudService<SentimentModify, SentimentRep |
|
|
|
String translateContent = ""; |
|
|
|
if (sourceAsMap.containsKey(ESConstant.TRANSLATETITLE)) { |
|
|
|
translateTitle = (String) sourceAsMap.get(ESConstant.TRANSLATETITLE); |
|
|
|
if(translateTitle.equals("")){ |
|
|
|
translateTitle = "未获取到翻译标题"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (sourceAsMap.containsKey(ESConstant.TRANSLATECONTENT)) { |
|
|
|
translateContent = (String) sourceAsMap.get(ESConstant.TRANSLATECONTENT); |
|
|
|
if(translateContent.equals("")){ |
|
|
|
translateContent = "未获取到翻译正文"; |
|
|
|
} |
|
|
|
} |
|
|
|
// 词云 |
|
|
|
List<String> hlKeywords = (List<String>) sourceAsMap.get(ESConstant.HL_KEYWORDS); |
|
|
|
List<String> hlKeywords = new ArrayList<>(); |
|
|
|
if (sourceAsMap.get(ESConstant.HL_KEYWORDS) instanceof List){ |
|
|
|
hlKeywords = (List<String>) sourceAsMap.get(ESConstant.HL_KEYWORDS); |
|
|
|
} |
|
|
|
//List<String> |
|
|
|
// 视频分析结果 |
|
|
|
String asrText = ""; |
|
|
|
List<String> ocrText = new ArrayList<>(); |
|
|
@ -403,18 +414,51 @@ public class SearchDataService extends CrudService<SentimentModify, SentimentRep |
|
|
|
} |
|
|
|
if(sourceAsMap.containsKey(ESConstant.TAG)){ |
|
|
|
tag = sourceAsMap.get(ESConstant.TAG).toString(); |
|
|
|
if(primary == 0 ){ |
|
|
|
String pageType = sourceAsMap.get(ESConstant.PAGETYPE).toString(); |
|
|
|
if(pageType.equals("socialFollow")){ |
|
|
|
String userType = sourceAsMap.get(ESConstant.USER_TYPE).toString(); |
|
|
|
if(userType.equals( "0")){ |
|
|
|
tag = "分享用户"; |
|
|
|
}else if (userType.equals("1")){ |
|
|
|
tag = "点赞用户"; |
|
|
|
} |
|
|
|
}else if (pageType.equals("socialComment")){ |
|
|
|
tag = "评论用户"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
String otherSourceJson = ""; |
|
|
|
if(sourceAsMap.containsKey(ESConstant.OTHERSOURCEJSON)){ |
|
|
|
otherSourceJson = sourceAsMap.get(ESConstant.OTHERSOURCEJSON).toString(); |
|
|
|
} |
|
|
|
String promotionInfo = ""; |
|
|
|
String promotionInfo = ""; // brife 字段 |
|
|
|
if(sourceAsMap.containsKey(ESConstant.PROMOTIONINFO)){ |
|
|
|
promotionInfo = sourceAsMap.get(ESConstant.PROMOTIONINFO).toString(); |
|
|
|
} |
|
|
|
int ugc = 0; |
|
|
|
int egc = 0; |
|
|
|
int pgc = 0; |
|
|
|
if(sourceAsMap.containsKey(ESConstant.SEARCH_SCOPE_UGC)){ |
|
|
|
ugc = (int) sourceAsMap.get(ESConstant.SEARCH_SCOPE_UGC); |
|
|
|
} |
|
|
|
if(sourceAsMap.containsKey(ESConstant.SEARCH_SCOPE_EGC)){ |
|
|
|
egc = (int) sourceAsMap.get(ESConstant.SEARCH_SCOPE_EGC); |
|
|
|
} |
|
|
|
if(sourceAsMap.containsKey(ESConstant.SEARCH_SCOPE_PGC)){ |
|
|
|
pgc = (int) sourceAsMap.get(ESConstant.SEARCH_SCOPE_PGC); |
|
|
|
} |
|
|
|
|
|
|
|
int readCount = 0; |
|
|
|
if(sourceAsMap.containsKey("readCount") && sourceAsMap.get("readCount") != ""){ |
|
|
|
readCount = (int) sourceAsMap.get("readCount"); |
|
|
|
} |
|
|
|
try { |
|
|
|
esMonitorEntity.setReadCount(readCount); |
|
|
|
esMonitorEntity.setEgc(egc); |
|
|
|
esMonitorEntity.setPgc(pgc); |
|
|
|
esMonitorEntity.setUgc(ugc); |
|
|
|
esMonitorEntity.setDataId(dataId); |
|
|
|
esMonitorEntity.setDocId(docId); |
|
|
|
esMonitorEntity.setChannel(channel); |
|
|
@ -933,6 +977,11 @@ public class SearchDataService extends CrudService<SentimentModify, SentimentRep |
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 导出专题下数据调用的方法 |
|
|
|
* @param queryRequest |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public JSONObject exportDataInSubjectIndex(QueryRequest queryRequest) { |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
try { |
|
|
|