|
@@ -2,14 +2,13 @@ package com.tzld.longarticle.recommend.server.service.score.strategy;
|
|
|
|
|
|
import com.tzld.longarticle.recommend.server.model.dto.Content;
|
|
|
import com.tzld.longarticle.recommend.server.model.dto.ContentHisPublishArticle;
|
|
|
-import com.tzld.longarticle.recommend.server.repository.crawler.AccountAvgInfoRepository;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.crawler.AccountAvgInfo;
|
|
|
+import com.tzld.longarticle.recommend.server.repository.crawler.AccountAvgInfoRepository;
|
|
|
import com.tzld.longarticle.recommend.server.service.AccountContentPoolConfigService;
|
|
|
import com.tzld.longarticle.recommend.server.service.AccountIndexAvgViewCountService;
|
|
|
import com.tzld.longarticle.recommend.server.service.score.Score;
|
|
|
import com.tzld.longarticle.recommend.server.service.score.ScoreParam;
|
|
|
import com.tzld.longarticle.recommend.server.service.score.ScoreStrategy;
|
|
|
-import com.tzld.longarticle.recommend.server.util.DateUtils;
|
|
|
import com.tzld.longarticle.recommend.server.util.MathUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -69,9 +68,8 @@ public class ViewCountRateCorrelationStrategy implements ScoreStrategy {
|
|
|
double avgViewCountSumSecond = 0D;
|
|
|
double maxAvgViewCount = 0D;
|
|
|
for (ContentHisPublishArticle hisItem : content.getHisPublishArticleList()) {
|
|
|
- // 过滤掉发布时间晚于20点数据
|
|
|
- int publishHour = DateUtils.getHourByTimestamp(hisItem.getUpdateTime());
|
|
|
- if (publishHour >= 19) {
|
|
|
+ // 过滤掉发布时间晚于19点数据
|
|
|
+ if (hisContentLateFilter(hisItem.getUpdateTime())) {
|
|
|
continue;
|
|
|
}
|
|
|
if (hisItem.isInnerAccount() && Objects.nonNull(hisItem.getViewCount())
|