Browse Source

feat:添加头部视频同品类渠道召回

zhaohaipeng 6 ngày trước cách đây
mục cha
commit
b0ecf95a3d

+ 6 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/rank/processor/RankProcessorBoost.java

@@ -59,12 +59,17 @@ public class RankProcessorBoost {
     }
 
     public static void boostByMergeCate(List<Video> rovList, Map<String, List<Map<String, String>>> rulesMap) {
+
+        if (CollectionUtils.isEmpty(rovList) || MapUtils.isEmpty(rulesMap)){
+            return;
+        }
+
         for (Video video : rovList) {
             if (CollectionUtils.isEmpty(video.getMergeCateList())) {
                 continue;
             }
 
-            // 遍历所有品类【目前只有一个品类】,找到第一个需要提权或降权的品类
+            // 目前只有一个品类
             for (String mergeCate : video.getMergeCateList()) {
                 double reduceCoefficient = RankProcessorBoost.parseReduceCoefficient(mergeCate, rulesMap);
                 double originScore = video.getScore();