Parcourir la source

rankV15 3-8内容池选择修改

wangyunpeng il y a 7 mois
Parent
commit
7aabf78ea1

+ 1 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV15Strategy.java

@@ -132,7 +132,7 @@ public class RankV15Strategy implements RankStrategy {
                 .collect(Collectors.toCollection(LinkedList::new));
         Queue<Content> otherPoolQueue = pool.stream().filter(o -> !Objects.equals(o.getSourceType(), videoSourceType))
                 .collect(Collectors.toCollection(LinkedList::new));
-        for (int i = 3; i < 9; i++) {
+        for (int i = 3; i < param.getSize() + 1; i++) {
             Integer sourceType = RankService.getStrategyPoolSourceType(param.getStrategy(), i);
             if (Objects.equals(sourceType, videoSourceType) && !videoPoolQueue.isEmpty()) {
                 result.add(videoPoolQueue.poll());