|
@@ -98,14 +98,7 @@ public class RankV4Strategy implements RankStrategy {
|
|
|
result.add(pool.get(2));
|
|
|
}
|
|
|
} else {
|
|
|
- // level2 兜底
|
|
|
- pool = contentMap.get(accountContentPoolConfigService.getContentPoolByLevel(2));
|
|
|
- if (CollectionUtils.isNotEmpty(pool)) {
|
|
|
- result.add(pool.get(0));
|
|
|
- if (pool.size() > 1) {
|
|
|
- result.add(pool.get(1));
|
|
|
- }
|
|
|
- }
|
|
|
+ return new RankResult(result);
|
|
|
}
|
|
|
} else if (level == 2) {
|
|
|
if (CollectionUtils.isNotEmpty(pool)) {
|
|
@@ -114,10 +107,7 @@ public class RankV4Strategy implements RankStrategy {
|
|
|
result.add(pool.get(1));
|
|
|
}
|
|
|
} else {
|
|
|
- pool = contentMap.get(ContentPoolEnum.autoArticlePoolLevel1.getContentPool());
|
|
|
- if (CollectionUtils.isNotEmpty(pool)) {
|
|
|
- result.add(pool.get(0));
|
|
|
- }
|
|
|
+ return new RankResult(result);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -129,12 +119,8 @@ public class RankV4Strategy implements RankStrategy {
|
|
|
if (CollectionUtils.isNotEmpty(pool2)) {
|
|
|
result.add(pool2.get(0));
|
|
|
}
|
|
|
- } else if (CollectionUtils.isNotEmpty(pool2)) {
|
|
|
- result.add(pool2.get(0));
|
|
|
- publishPool[0] = contentPools[1];
|
|
|
- if (pool2.size() > 1) {
|
|
|
- result.add(pool2.get(1));
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ return new RankResult(result);
|
|
|
}
|
|
|
}
|
|
|
|