浏览代码

feat:添加字段

zhaohaipeng 1 年之前
父节点
当前提交
1a63f74194

+ 2 - 0
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/log/impl/LogHubServiceImpl.java

@@ -63,6 +63,7 @@ public class LogHubServiceImpl implements LogHubService {
                     json.put("adId", rankItem.getAdId());
                     json.put("score", rankItem.getScore());
                     json.put("ext", rankItem.getExt());
+                    json.put("weight", rankItem.getWeight());
                     scoreResult.add(json);
                 }
                 logMap.put("scoreResult", JSON.toJSONString(scoreResult));
@@ -71,6 +72,7 @@ public class LogHubServiceImpl implements LogHubService {
                 logMap.put("top1_adId", top1.getAdId());
                 logMap.put("top1_score", top1.getScore());
                 logMap.put("top1_exp", top1.getExt());
+                logMap.put("top1_weight", top1.getWeight());
 
                 logMap.put("creativeList", JSON.toJSONString(adIdList));
                 logMap.put("adAbGroup", requestParam.getAdAbGroup());

+ 7 - 0
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/VideoAdThompsonScorerV2.java

@@ -140,6 +140,7 @@ public class VideoAdThompsonScorerV2 {
             item.setScore_type(663);
             item.setBid1(dto.getBid1());
             item.setBid2(dto.getBid2());
+            item.setWeight(dto.getWeight());
             result.add(item);
         }
 
@@ -373,6 +374,7 @@ public class VideoAdThompsonScorerV2 {
             item.setScore_type(666);
             item.setBid2(dto.getBid2());
             item.setBid1(dto.getBid1());
+            item.setWeight(dto.getWeight());
             result.add(item);
         }
 
@@ -443,6 +445,8 @@ public class VideoAdThompsonScorerV2 {
             ext.put("vidCidA", alpha);
             ext.put("cidB", cidBeta);
             ext.put("vidCidB", vidCidBeta);
+            ext.put("bid1", dto.getBid1());
+            ext.put("bid2", dto.getBid2());
             ext.put("cidStatistic", JSON.toJSONString(cidStatistic));
             ext.put("vidCidStatistic", JSON.toJSONString(vidCidStatistic));
             ext.put("cpa", dto.getCpa());
@@ -453,8 +457,11 @@ public class VideoAdThompsonScorerV2 {
             AdRankItem item = new AdRankItem();
             item.setCpa(dto.getCpa());
             item.setAdId(dto.getCreativeId());
+            item.setWeight(dto.getWeight());
             item.setScore(score);
             item.setExt(ext);
+            item.setBid1(dto.getBid1());
+            item.setBid2(dto.getBid2());
 
             result.add(item);
         }

+ 2 - 0
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/dto/AdPlatformCreativeDTO.java

@@ -30,6 +30,8 @@ public class AdPlatformCreativeDTO {
 
     private Double ecpm2;
 
+    private double weight;
+
     public static void main(String[] args) {
         System.out.println(JSON.toJSONString(AdPlatformCreativeDTO.builder()
                 .creativeId(3366L)