|
@@ -11,6 +11,7 @@ import com.tzld.longarticle.recommend.server.common.enums.recommend.FeishuRobotI
|
|
|
import com.tzld.longarticle.recommend.server.mapper.aigc.AigcBaseMapper;
|
|
|
import com.tzld.longarticle.recommend.server.mapper.aigc.PublishContentMapper;
|
|
|
import com.tzld.longarticle.recommend.server.mapper.longArticle.LongArticleBaseMapper;
|
|
|
+import com.tzld.longarticle.recommend.server.model.dto.CrawlerContent;
|
|
|
import com.tzld.longarticle.recommend.server.model.dto.PublishContentDTO;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.aigc.PublishAccount;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.crawler.PublishSortLog;
|
|
@@ -467,13 +468,21 @@ public class ArticlePromotionService {
|
|
|
}).collect(Collectors.toList());
|
|
|
List<PublishContentDTO> publishContentList = publishContentMapper.getPublishContentByTitle(publishContentParamList);
|
|
|
List<String> existsTitles = aigcBaseMapper.getProduceContentTitleByPlanId(topProducePlanId);
|
|
|
+ List<String> channelContentIds = publishContentList.stream().map(PublishContentDTO::getCrawlerChannelContentId).collect(Collectors.toList());
|
|
|
+ List<CrawlerContent> crawlerContentList = aigcBaseMapper.getCrawlerContentByChannelContentIdIn(channelContentIds);
|
|
|
+ Map<String, Long> crawlerContentMap = crawlerContentList.stream().collect(Collectors.toMap(
|
|
|
+ CrawlerContent::getChannelContentId, CrawlerContent::getId));
|
|
|
for (PublishContentDTO item : publishContentList) {
|
|
|
if (TitleSimilarCheckUtil.isDuplicateContent(item.getTitle(), existsTitles, TitleSimilarCheckUtil.ARTICLE_PROMOTION_THRESHOLD)) {
|
|
|
continue;
|
|
|
}
|
|
|
existsTitles.add(item.getTitle());
|
|
|
String inputSourceLabel = String.format("原始帖子-长文-微信公众号-内容IDs-%s", item.getTitle());
|
|
|
- articleAddDependPlan(topProducePlanId, item.getCrawlerChannelContentId(), inputSourceLabel,
|
|
|
+ Long crawlerContentId = crawlerContentMap.get(item.getCrawlerChannelContentId());
|
|
|
+ if (Objects.isNull(crawlerContentId)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ articleAddDependPlan(topProducePlanId, String.valueOf(crawlerContentId), inputSourceLabel,
|
|
|
ProducePlanInputSourceTypeEnum.contentID.getVal());
|
|
|
}
|
|
|
return ReturnT.SUCCESS;
|