|
|
@@ -1,5 +1,6 @@
|
|
|
package com.tzld.longarticle.recommend.server.service.recommend;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
|
|
import com.tzld.longarticle.recommend.server.common.CommonThreadPoolExecutor;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.StatusEnum;
|
|
|
@@ -379,4 +380,15 @@ public class ArticleService {
|
|
|
public String getCooperateArticleIdByRootSourceId(String rootSourceId) {
|
|
|
return longArticleBaseMapper.getCooperateArticleIdByRootSourceId(rootSourceId);
|
|
|
}
|
|
|
+
|
|
|
+ public List<String> getNearDaysRootSourceIds(String rootSourceIdPrefix, Integer days) {
|
|
|
+ Long beforeDateStart = DateUtils.getBeforeDayStart(days);
|
|
|
+ List<String> rootSourceIdLists = crawlerBaseMapper.getNearDaysRootSourceIds(rootSourceIdPrefix, beforeDateStart);
|
|
|
+ List<String> result = new ArrayList<>();
|
|
|
+ rootSourceIdLists.forEach(rootSourceIdList -> {
|
|
|
+ List<String> list = JSONObject.parseArray(rootSourceIdList, String.class);
|
|
|
+ result.addAll(list);
|
|
|
+ });
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|