Procházet zdrojové kódy

Merge branch 'cooperation_video_candidate_pool_improved_lld_0509' into test

刘立冬 před 3 dny
rodič
revize
cd0fd7e0fc

+ 2 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -808,6 +808,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
      *   1. 组按"组内最大 total_rov" 倒序
      *   2. 组内按 score 倒序,组内 video_id 去重,最多取 topK 条
      *   3. excludeSelfTitle=true 时先在 Java 端用 TitleNormalizer 过滤自标题行
+     *   4. rov 为 null 或 <=0 的行视为"近 7 日无表现",直接丢弃不入池
      */
     private List<VideoContentItemVO> groupAndTopK(List<ContentPlatformDemandVideo> rows,
                                                   Function<ContentPlatformDemandVideo, String> keyFn,
@@ -820,6 +821,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
         Map<String, Double> groupRov = new HashMap<>();
         for (ContentPlatformDemandVideo r : rows) {
             if (r.getVideoId() == null) continue;
+            if (r.getRov() == null || r.getRov() <= 0) continue;
             if (excludeSelfTitle && TitleNormalizer.isSelfTitle(r.getTitle(), r.getDemandContentTitle())) continue;
             String k = keyFn.apply(r);
             if (k == null) continue;