Browse Source

增加历史表现粉丝量

wangyunpeng 10 months ago
parent
commit
875e687cec

+ 1 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/ContentHisPublishArticle.java

@@ -22,6 +22,6 @@ public class ContentHisPublishArticle {
     private Integer firstViewCount;
     private Double firstViewCountRate;
     private boolean isInnerAccount = false;
-
+    private long fans;
     private List<ArticleDetailInfo> articleDetailInfoList;
 }

+ 0 - 2
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/rank/strategy/RankV5Strategy.java

@@ -14,7 +14,6 @@ import com.tzld.longarticle.recommend.server.service.score.ScoreResult;
 import com.tzld.longarticle.recommend.server.service.score.ScoreService;
 import com.tzld.longarticle.recommend.server.service.score.strategy.*;
 import com.tzld.longarticle.recommend.server.util.CommonCollectionUtils;
-import com.tzld.longarticle.recommend.server.util.JSONUtils;
 import com.tzld.longarticle.recommend.server.util.TitleSimilarCheckUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
@@ -47,7 +46,6 @@ public class RankV5Strategy implements RankStrategy {
 
         List<RankItem> items = CommonCollectionUtils.toList(param.getContents(), c -> {
             RankItem item = new RankItem();
-            c.setHisPublishArticleList(null);
             item.setContent(c);
             item.setScoreMap(scoreMap.get(c.getId()));
             double score;

+ 3 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recall/RecallService.java

@@ -256,6 +256,9 @@ public class RecallService implements ApplicationContextAware {
                 }
                 // 设置头条阅读均值
                 AccountAvgInfo firstIndexAvgInfo = firstIndexAvgInfoMap.get(hisArticle.getGhId());
+                if (Objects.nonNull(firstIndexAvgInfo)) {
+                    article.setFans(firstIndexAvgInfo.getFans());
+                }
                 Map<String, Article> firstIndexArticle = firstIndexHisArticleMap.get(hisArticle.getGhId());
                 if (Objects.nonNull(firstIndexArticle) && firstIndexArticle.containsKey(hisArticle.getAppMsgId())) {
                     Article firstArticle = firstIndexArticle.get(hisArticle.getAppMsgId());