Bladeren bron

feat:添加日志

zhaohaipeng 10 maanden geleden
bovenliggende
commit
f648215422

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

@@ -37,8 +37,8 @@ public class VideoAdThompsonScorerV2 {
     private Map<String, Double> exp665Param = new HashMap<>();
     private Map<String, Double> exp666Param = new HashMap<>();
     private Map<String, Double> exp669Param = new HashMap<>();
-    private Map<String, String> exp670Param = new HashMap<>();
-    private Map<String, String> exp672Param = new HashMap<>();
+    private Map<String, Object> exp670Param = new HashMap<>();
+    private Map<String, Object> exp672Param = new HashMap<>();
 
     Random random = new Random();
     Gson gson = new Gson();
@@ -409,8 +409,8 @@ public class VideoAdThompsonScorerV2 {
         Map<Long, CreativeStatistic> cidMap = this.batchFindCreativeRedisCache(redisCidActionKeyV1, adIdList);
         Map<Long, CreativeStatistic> vidCidMap = this.batchFindCreativeRedisCache(redisCidVidActionKeyV1 + param.getVideoId() + "_", adIdList);
 
-        double w1 = Double.parseDouble(exp670Param.getOrDefault("w1", "1"));
-        double w2 = Double.parseDouble(exp670Param.getOrDefault("w2", "1"));
+        double w1 = Double.parseDouble(exp670Param.getOrDefault("w1", "1").toString());
+        double w2 = Double.parseDouble(exp670Param.getOrDefault("w2", "1").toString());
         String scoreCalcWay = exp670Param.getOrDefault("scoreCalcWay", "statistic");
 
         double alpha = Double.parseDouble(exp670Param.getOrDefault("alpha", "0"));
@@ -630,9 +630,9 @@ public class VideoAdThompsonScorerV2 {
     }
 
     public List<AdRankItem> thompsonScorerByExp672(ScoreParam param, List<AdPlatformCreativeDTO> adIdList) {
-        String cidRedisKey = exp672Param.getOrDefault("cidActionRedisKey", redisCreativeStatisticsPrefix);
-        String vidCidRedisKey = exp672Param.getOrDefault("vidCidActionRedisKey", redisVideoCreativeStatisticsPrefix);
-        double viewThreshold = Double.parseDouble(exp672Param.getOrDefault("viewThreshold", "7000"));
+        String cidRedisKey = exp672Param.getOrDefault("cidActionRedisKey", redisCreativeStatisticsPrefix).toString();
+        String vidCidRedisKey = exp672Param.getOrDefault("vidCidActionRedisKey", redisVideoCreativeStatisticsPrefix).toString();
+        double viewThreshold = Double.parseDouble(exp672Param.getOrDefault("viewThreshold", "7000").toString());
 
         // RedisKey前缀判断
         if (!StringUtils.equals(redisCidActionKeyV1, cidRedisKey) && !StringUtils.equals(redisCreativeStatisticsPrefix, cidRedisKey)) {