|
@@ -112,14 +112,15 @@ public class ArticleService {
|
|
|
Article article = articleRepository.getByWxSn(wxSn);
|
|
|
String ghId = article.getGhId();
|
|
|
String title = article.getTitle();
|
|
|
+ Long publishTimestamp = article.getUpdateTime() * 1000;
|
|
|
PublishAccount publishAccount = publishAccountRepository.getByGhId(ghId);
|
|
|
- List<PublishContent> publishContentList = aigcBaseMapper.getNearestPublishContent(publishAccount.getId(), null);
|
|
|
+ List<PublishContent> publishContentList = aigcBaseMapper.getNearestPublishContent(publishAccount.getId(), publishTimestamp, 100);
|
|
|
if (CollectionUtils.isEmpty(publishContentList)) {
|
|
|
return;
|
|
|
}
|
|
|
String publishContentId = null;
|
|
|
String channelContentId = null;
|
|
|
- Long publishTimestamp = article.getUpdateTime() * 1000;
|
|
|
+
|
|
|
PublishContent publishContent = findPublishContent(publishContentList, title, publishTimestamp);
|
|
|
if (Objects.nonNull(publishContent)) {
|
|
|
publishContentId = publishContent.getId();
|
|
@@ -221,11 +222,11 @@ public class ArticleService {
|
|
|
return result;
|
|
|
}
|
|
|
String title = crawlerContent.getTitle();
|
|
|
- List<PublishContent> publishContentList = aigcBaseMapper.getNearestPublishContent(publishAccount.getId(), null);
|
|
|
+ Long publishTimestamp = crawlerContent.getPublishTimestamp();
|
|
|
+ List<PublishContent> publishContentList = aigcBaseMapper.getNearestPublishContent(publishAccount.getId(), publishTimestamp, 100);
|
|
|
if (CollectionUtils.isEmpty(publishContentList)) {
|
|
|
return result;
|
|
|
}
|
|
|
- Long publishTimestamp = crawlerContent.getPublishTimestamp();
|
|
|
PublishContent publishContent = findPublishContent(publishContentList, title, publishTimestamp);
|
|
|
if (Objects.nonNull(publishContent)) {
|
|
|
if (!StringUtils.hasText(sourcePublishContentId)) {
|
|
@@ -260,6 +261,15 @@ public class ArticleService {
|
|
|
long now = System.currentTimeMillis();
|
|
|
for (ArticlePoolPromotionSource task : tasks) {
|
|
|
// 溯源
|
|
|
+ PublishAccount publishAccount = publishAccountRepository.getByGhId(task.getGhId());
|
|
|
+ if (Objects.isNull(publishAccount)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ List<PublishContent> publishContentList = aigcBaseMapper.getNearestPublishContent(publishAccount.getId(), now, null);
|
|
|
+ PublishContent publishContent = findPublishContent(publishContentList, task.getTitle(), now);
|
|
|
+ if (Objects.isNull(publishContent)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
RootPublishContentVO source = getRootPublishContent(task.getChannelContentId(), null, null, null, 0);
|
|
|
// 更新
|
|
|
if (StringUtils.hasText(source.getRootProduceContentId())) {
|
|
@@ -291,10 +301,8 @@ public class ArticleService {
|
|
|
}
|
|
|
longArticleBaseMapper.updateRootProduceContentLevel(task.getRootProduceContentId(), task.getLevel());
|
|
|
} else {
|
|
|
- if (task.getCreateTimestamp() < now - 86400) {
|
|
|
- task.setDeleted(StatusEnum.SUCCESS.getCode());
|
|
|
- articlePoolPromotionSourceRepository.save(task);
|
|
|
- }
|
|
|
+ task.setDeleted(StatusEnum.SUCCESS.getCode());
|
|
|
+ articlePoolPromotionSourceRepository.save(task);
|
|
|
}
|
|
|
}
|
|
|
}
|