Commit e373a3c9 authored by maliang's avatar maliang

权限控制

parent 4de75497
...@@ -237,8 +237,8 @@ public class AdvertiserServiceImpl implements AdvertiserService { ...@@ -237,8 +237,8 @@ public class AdvertiserServiceImpl implements AdvertiserService {
Map<String, List<String>> exposure = minutesCodeIdExposure.stream().collect(Collectors.groupingBy(x -> x.split(",")[0])); Map<String, List<String>> exposure = minutesCodeIdExposure.stream().collect(Collectors.groupingBy(x -> x.split(",")[0]));
JSONObject resultClick = sumByKey(click); JSONObject resultClick = sumByKey(click);
JSONObject resultExposure = sumByKey(exposure); JSONObject resultExposure = sumByKey(exposure);
Map emap=JSON.parseObject(resultExposure.getString("map")); Map emap=resultExposure.getObject("map",Map.class);
Map cmap=JSON.parseObject(resultClick.getString("map")); Map cmap=resultClick.getObject("map",Map.class);
Set keySet = emap.keySet(); Set keySet = emap.keySet();
for (Object o : keySet) { for (Object o : keySet) {
if(!cmap.containsKey(o)){ if(!cmap.containsKey(o)){
...@@ -253,8 +253,16 @@ public class AdvertiserServiceImpl implements AdvertiserService { ...@@ -253,8 +253,16 @@ public class AdvertiserServiceImpl implements AdvertiserService {
Map<String, List<String>> exposure = minutesCodeIdExposure.stream().filter(x->x.split(",")[1].equals(advertId)).collect(Collectors.groupingBy(x -> x.split(",")[0])); Map<String, List<String>> exposure = minutesCodeIdExposure.stream().filter(x->x.split(",")[1].equals(advertId)).collect(Collectors.groupingBy(x -> x.split(",")[0]));
JSONObject resultClick = sumByKey(click); JSONObject resultClick = sumByKey(click);
JSONObject resultExposure = sumByKey(exposure); JSONObject resultExposure = sumByKey(exposure);
Map emap=resultExposure.getObject("map",Map.class);
Map cmap=resultClick.getObject("map",Map.class);
Set keySet = emap.keySet();
for (Object o : keySet) {
if(!cmap.containsKey(o)){
cmap.put(o,0);
}
}
jsonObject.put("dataTime",resultExposure.get("dataTime")); jsonObject.put("dataTime",resultExposure.get("dataTime"));
jsonObject.put("click",resultClick.get("sum")); jsonObject.put("click",sortMap(cmap));
jsonObject.put("exposure",resultExposure.get("sum")); jsonObject.put("exposure",resultExposure.get("sum"));
} }
return jsonObject; return jsonObject;
......
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