|
@@ -72,6 +72,7 @@ public class LogHubServiceImpl implements LogHubService {
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("cid", rankItem.getAdId());
|
|
|
json.put("score", rankItem.getScore());
|
|
|
+ rankItem.getScoreMap().put("score", rankItem.getScore());
|
|
|
json.put("scoremap", rankItem.getScoreMap());
|
|
|
JSONObject featureJson = new JSONObject();
|
|
|
for (Map.Entry<String, String> entry : rankItem.getFeatureMap().entrySet()) {
|
|
@@ -84,8 +85,13 @@ public class LogHubServiceImpl implements LogHubService {
|
|
|
featureJson.put(entry.getKey(), entry.getValue());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ for (Map.Entry<String, Double> entry : rankItem.getScoreMap().entrySet()) {
|
|
|
+ featureJson.put(entry.getKey(), entry.getValue().toString());
|
|
|
+ }
|
|
|
+
|
|
|
if (MapUtils.isNotEmpty(featureJson)) {
|
|
|
- json.put("feature", featureJson);
|
|
|
+ json.put("allfeature", featureJson);
|
|
|
}
|
|
|
scoreResult.add(json);
|
|
|
}
|
|
@@ -100,9 +106,18 @@ public class LogHubServiceImpl implements LogHubService {
|
|
|
logMap.put("adid", top1.getId());
|
|
|
logMap.put("campaignid", top1.getCampaignId());
|
|
|
logMap.put("score", top1.getScore());
|
|
|
+
|
|
|
+
|
|
|
+ top1.getScoreMap().put("score", top1.getScore());
|
|
|
+ logMap.put("scoremap", JSON.toJSONString(top1.getScoreMap()));
|
|
|
+
|
|
|
+ for (Map.Entry<String, Double> entry : top1.getScoreMap().entrySet()) {
|
|
|
+ top1.getFeatureMap().put(entry.getKey(), entry.getValue().toString());
|
|
|
+ }
|
|
|
+
|
|
|
logMap.put("allfeature", JSON.toJSONString(top1.getFeatureMap()));
|
|
|
logMap.put("metafeature", JSON.toJSONString(top1.getMetaFeatureMap()));
|
|
|
- logMap.put("scoremap", JSON.toJSONString(top1.getScoreMap()));
|
|
|
+
|
|
|
|
|
|
// logMap.put("scorestrategy", scoreStrategy);
|
|
|
// logMap.put("creativeList", JSON.toJSONString(adIdList));
|