丁云鹏 пре 11 месеци
родитељ
комит
a60230f51d

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

@@ -125,7 +125,9 @@ public class RankV3Strategy implements RankStrategy {
         if (CollectionUtils.isNotEmpty(pool)) {
             Collections.shuffle(pool);
             result.addAll(pool.subList(0, Math.min(pool.size(), param.getSize() - result.size())));
-        } else {
+        }
+
+        if (result.size() < param.getSize()) {
             // 兜底
             pool = param.getBackup();
             pool = deduplication(pool);