|
@@ -96,7 +96,10 @@ public class XxlJobService {
|
|
|
public ReturnT<String> migrateCrawlerRootSourceId(String param) {
|
|
|
try {
|
|
|
long timeStamp = DateUtils.getBeforeDayStart(1);
|
|
|
- List<GetOffVideoCrawler> getOffVideoCrawlerList = getOffVideoCrawlerRepository.getByPublishTimeGreaterThan(timeStamp / 1000);
|
|
|
+ if (StringUtils.hasText(param)) {
|
|
|
+ timeStamp = DateUtils.getStartOfDay(param, "yyyyMMdd");
|
|
|
+ }
|
|
|
+ List<GetOffVideoCrawler> getOffVideoCrawlerList = getOffVideoCrawlerRepository.getByPublishTimeBetween(timeStamp, timeStamp + 86400);
|
|
|
List<String> traceIds = getOffVideoCrawlerList.stream().map(GetOffVideoCrawler::getTraceId).distinct().collect(Collectors.toList());
|
|
|
List<LongArticlesVideo> longArticlesVideoList = longArticlesVideoRepository.getByTraceIdIn(traceIds);
|
|
|
for (LongArticlesVideo longArticlesVideo : longArticlesVideoList) {
|
|
@@ -150,7 +153,10 @@ public class XxlJobService {
|
|
|
public ReturnT<String> migrateArticleRootSourceId(String param) {
|
|
|
try {
|
|
|
long timeStamp = DateUtils.getBeforeDayStart(1);
|
|
|
- List<GetOffVideoArticle> getOffVideoArticleList = getOffVideoArticleRepository.getByPublishTimeGreaterThan(timeStamp / 1000);
|
|
|
+ if (StringUtils.hasText(param)) {
|
|
|
+ timeStamp = DateUtils.getStartOfDay(param, "yyyyMMdd");
|
|
|
+ }
|
|
|
+ List<GetOffVideoArticle> getOffVideoArticleList = getOffVideoArticleRepository.getByPublishTimeBetween(timeStamp, timeStamp + 86400);
|
|
|
List<String> traceIds = getOffVideoArticleList.stream().map(GetOffVideoArticle::getTraceId).distinct().collect(Collectors.toList());
|
|
|
List<LongArticlesMatchVideo> longArticlesMatchVideoList = longArticlesMatchVideoRepository.getByTraceIdIn(traceIds);
|
|
|
for (LongArticlesMatchVideo longArticlesMatchVideo : longArticlesMatchVideoList) {
|