Commit 36b35ceb by shenjunjie

2022/11/17 10:40

parent 381699b2
...@@ -1788,7 +1788,7 @@ public class MarkDataServiceImpl implements MarkDataService { ...@@ -1788,7 +1788,7 @@ public class MarkDataServiceImpl implements MarkDataService {
emotionMap.put(ChannelEmotion.NEUTRAL.getState(), new AtomicInteger()); emotionMap.put(ChannelEmotion.NEUTRAL.getState(), new AtomicInteger());
for (SearchResponse searchResponse : searchResponses) { for (SearchResponse searchResponse : searchResponses) {
for (SearchHit hit : searchResponse.getHits().getHits()) { for (SearchHit hit : searchResponse.getHits().getHits()) {
Object emotionObj = Tools.getBrandkbsHitMap(hit.getSourceAsMap(), Tools.concat(projectId, linkedGroupId, "0")).get("channel_emotion"); Object emotionObj = Tools.getBrandkbsHitMap(hit.getSourceAsMap(), Tools.concat(projectId, "0")).get("channel_emotion");
if (null != emotionObj) { if (null != emotionObj) {
int channelEmotion = Integer.parseInt(String.valueOf(emotionObj)); int channelEmotion = Integer.parseInt(String.valueOf(emotionObj));
Optional.ofNullable(emotionMap.get(channelEmotion)).ifPresent(AtomicInteger::getAndIncrement); Optional.ofNullable(emotionMap.get(channelEmotion)).ifPresent(AtomicInteger::getAndIncrement);
......
...@@ -136,7 +136,7 @@ public class MarkFlowServiceImpl implements MarkFlowService { ...@@ -136,7 +136,7 @@ public class MarkFlowServiceImpl implements MarkFlowService {
// sourceDetails.put("channelEmotion", ChannelEmotion.getNameFromState(hitMap.get("channel_emotion"))); // sourceDetails.put("channelEmotion", ChannelEmotion.getNameFromState(hitMap.get("channel_emotion")));
// } // }
// } // }
JSONObject brandkbsHitJson = Tools.getBrandkbsHitMap(tJson, Tools.concat(projectId, linkedGroupId, contendId)); JSONObject brandkbsHitJson = Tools.getBrandkbsHitMap(tJson, Tools.concat(projectId, contendId));
if (null != brandkbsHitJson.get("channel_emotion")) { if (null != brandkbsHitJson.get("channel_emotion")) {
sourceDetails.put("channelEmotion", ChannelEmotion.getNameFromState(brandkbsHitJson.getIntValue("channel_emotion"))); sourceDetails.put("channelEmotion", ChannelEmotion.getNameFromState(brandkbsHitJson.getIntValue("channel_emotion")));
} }
......
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