Browse Source

Merge branch 'refs/heads/dev-xym-update-guarantee' into pre-master

xueyiming 3 days ago
parent
commit
6e35b7426d

+ 5 - 3
ad-engine-server/src/main/java/com/tzld/piaoquan/ad/engine/server/controller/AdRecommendController.java

@@ -52,8 +52,9 @@ public class AdRecommendController {
                 contentMap.put("adId", rankResult.getAdId());
                 contentMap.put("adScore", rankResult.getScore());
                 Double ctcvrScore = rankResult.getScoreMap().get("ctcvrScore");
+                Double modelCtcvrScore = rankResult.getScoreMap().get("modelCtcvrScore");
                 if (ctcvrScore != null && ctcvrScore > 0) {
-                    contentMap.put("ecpm", ctcvrScore * rankResult.getCpa() * 1000);
+                    contentMap.put("ecpm", modelCtcvrScore * rankResult.getCpa() * 1000);
                     if (rankResult.getExt().get("correctionFactor") != null) {
                         contentMap.put("revisedBid", ctcvrScore * rankResult.getCpa() * (double) rankResult.getExt().get("correctionFactor"));
                     } else {
@@ -62,15 +63,16 @@ public class AdRecommendController {
                 } else {
                     contentMap.put("revisedBid", rankResult.getCpm() / 1000);
                 }
+                List<String> participateCompetitionType = new ArrayList<>();
+                participateCompetitionType.add("engine");
                 if (rankResult.getExt().get("isGuaranteed") != null && rankResult.getExt().get("isGuaranteed").equals(true)) {
                     contentMap.put("type", GuaranteedTypeEnum.IS_GUARANTEED.getType());
                 } else if (rankResult.getExt().containsKey("isHotRank") && Boolean.TRUE.equals(rankResult.getExt().get("isHotRank"))) {
                     contentMap.put("type", 2);
+                    participateCompetitionType.add("weight");
                 } else {
                     contentMap.put("type", GuaranteedTypeEnum.NOT_GUARANTEED.getType());
                 }
-                List<String> participateCompetitionType = new ArrayList<>();
-                participateCompetitionType.add("engine");
                 if (rankResult.getExt().containsKey("isGuaranteeType") && (boolean) rankResult.getExt().get("isGuaranteeType")) {
                     participateCompetitionType.add("guarantee");
                 }