|
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ctrip.framework.apollo.model.ConfigChangeEvent;
|
|
import com.ctrip.framework.apollo.model.ConfigChangeEvent;
|
|
|
import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
|
|
import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
|
|
|
import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
|
|
import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
|
|
|
|
|
+import com.tzld.longarticle.recommend.server.common.ContentCountMonitor;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.aigc.PublishPlanInputSourceTypesEnum;
|
|
import com.tzld.longarticle.recommend.server.common.enums.aigc.PublishPlanInputSourceTypesEnum;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.recommend.RankStrategyEnum;
|
|
import com.tzld.longarticle.recommend.server.common.enums.recommend.RankStrategyEnum;
|
|
|
import com.tzld.longarticle.recommend.server.model.dto.Content;
|
|
import com.tzld.longarticle.recommend.server.model.dto.Content;
|
|
@@ -96,6 +97,7 @@ public class RankService implements InitializingBean {
|
|
|
|
|
|
|
|
public static void printSortLog(String strategy, String accountName, String position, List<Content> contentList) {
|
|
public static void printSortLog(String strategy, String accountName, String position, List<Content> contentList) {
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
|
+ ContentCountMonitor.logCount("Rank", position, Objects.isNull(contentList) ? 0 : contentList.size());
|
|
|
if (CollectionUtil.isEmpty(contentList)) {
|
|
if (CollectionUtil.isEmpty(contentList)) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -176,6 +178,7 @@ public class RankService implements InitializingBean {
|
|
|
if (CollectionUtils.isNotEmpty(pool)) {
|
|
if (CollectionUtils.isNotEmpty(pool)) {
|
|
|
pool = contentSourceTypeFilter(param.getStrategy(), pool, 3);
|
|
pool = contentSourceTypeFilter(param.getStrategy(), pool, 3);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if (CollectionUtils.isNotEmpty(pool) && param.getSize() > result.size()) {
|
|
if (CollectionUtils.isNotEmpty(pool) && param.getSize() > result.size()) {
|
|
|
RankService.printSortLog(strategy, param.getAccountName(), "3-8", pool);
|
|
RankService.printSortLog(strategy, param.getAccountName(), "3-8", pool);
|
|
|
result.addAll(pool.subList(0, Math.min(pool.size(), param.getSize() - result.size())));
|
|
result.addAll(pool.subList(0, Math.min(pool.size(), param.getSize() - result.size())));
|