Commit 2ad027ed by shenjunjie

修复非人工项目渠道统计bug

parent 70356e10
...@@ -103,12 +103,14 @@ public class ChannelIndex extends AbstractBaseMongo { ...@@ -103,12 +103,14 @@ public class ChannelIndex extends AbstractBaseMongo {
return res; return res;
} }
List<Map<String, Object>> cacheMaps = (List<Map<String, Object>>) sourceAsMap.get(GenericAttribute.ES_BRANDKBS_CACHE_MAPS); List<Map<String, Object>> cacheMaps = (List<Map<String, Object>>) sourceAsMap.get(GenericAttribute.ES_BRANDKBS_CACHE_MAPS);
List<String> manualProjectIds = GlobalPojo.PROJECT_MAP.entrySet().stream().filter(entry -> entry.getValue().isManual()).map(Map.Entry::getKey).collect(Collectors.toList()); // 非人工项目
List<String> nonManualProjectIds =
GlobalPojo.PROJECT_MAP.entrySet().stream().filter(entry ->!entry.getValue().isManual()).map(Map.Entry::getKey).collect(Collectors.toList());
for (Map<String, Object> cacheMap : cacheMaps) { for (Map<String, Object> cacheMap : cacheMaps) {
String projectId = String.valueOf(cacheMap.get("project_id")); String projectId = String.valueOf(cacheMap.get("project_id"));
String contendId = String.valueOf(cacheMap.get("contend_id")); String contendId = String.valueOf(cacheMap.get("contend_id"));
// 剔除非人工项目 // 剔除非人工项目
if(manualProjectIds.contains(projectId)){ if(nonManualProjectIds.contains(projectId)){
continue; continue;
} }
ChannelIndex channelIndex = new ChannelIndex(projectId, contendId, messagePlatform.getName(), realSource, source); ChannelIndex channelIndex = new ChannelIndex(projectId, contendId, messagePlatform.getName(), realSource, source);
......
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