|
@@ -497,6 +497,35 @@ public class ArticlePromotionService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void articleAddDependPlan(String produceId, ProducePlanDetailVO detail, String inputSourceValue,
|
|
|
+ String inputSourceLabel, Integer inputSourceType) {
|
|
|
+ try {
|
|
|
+ // 获取生产计划的详细信息
|
|
|
+ if (detail == null) {
|
|
|
+ FeishuMessageSender.sendWebHookMessage(FeishuRobotIdEnum.JOB.getRobotId(),
|
|
|
+ "文章晋升ERROR:\n" +
|
|
|
+ "articleAddDependPlan getProducePlan error: planId:" + produceId);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // 获取依赖计划 ID 列表
|
|
|
+ List<ProducePlanInputSourceParam> inputSources = detail.getInputSourceGroups().get(0).getInputSources();
|
|
|
+ List<String> dependValues = new ArrayList<>();
|
|
|
+ for (ProducePlanInputSourceParam inputSource : inputSources) {
|
|
|
+ dependValues.add(inputSource.getInputSourceValue());
|
|
|
+ }
|
|
|
+ // 如果计划 ID 已存在,直接返回
|
|
|
+ if (dependValues.contains(inputSourceValue)) {
|
|
|
+ log.info("depend_value exist: {}", inputSourceValue);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ aigcProducePlanSaveService.save(inputSourceLabel, inputSourceValue, detail, inputSourceType);
|
|
|
+ } catch (Exception e) {
|
|
|
+ FeishuMessageSender.sendWebHookMessage(FeishuRobotIdEnum.JOB.getRobotId(),
|
|
|
+ "文章晋升ERROR:\n" +
|
|
|
+ "articleAddDependPlan error: " + e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public void articleVideoPoolPromotion(Integer viewCountFilter, Double viewCountRateFilter,
|
|
|
List<Integer> positionFilter, Integer poolLevel) {
|
|
|
String dateStrFilter = DateUtils.getBeforeDaysDateStr("yyyyMMdd", 10);
|
|
@@ -610,6 +639,7 @@ public class ArticlePromotionService {
|
|
|
List<CrawlerContent> crawlerContentList = aigcBaseMapper.getCrawlerContentByChannelContentIdIn(channelContentIds);
|
|
|
Map<String, Long> crawlerContentMap = crawlerContentList.stream().collect(Collectors.toMap(
|
|
|
CrawlerContent::getChannelContentId, CrawlerContent::getId));
|
|
|
+ ProducePlanDetailVO detail = aigcProducePlanDetailService.articleGetProducePlanDetail(topProducePlanId);
|
|
|
for (PublishContentDTO item : publishContentList) {
|
|
|
if (TitleSimilarCheckUtil.isDuplicateContent(item.getTitle(), existsTitles, TitleSimilarCheckUtil.ARTICLE_PROMOTION_THRESHOLD)) {
|
|
|
continue;
|
|
@@ -620,7 +650,7 @@ public class ArticlePromotionService {
|
|
|
if (Objects.isNull(crawlerContentId)) {
|
|
|
continue;
|
|
|
}
|
|
|
- articleAddDependPlan(topProducePlanId, String.valueOf(crawlerContentId), inputSourceLabel,
|
|
|
+ articleAddDependPlan(topProducePlanId, detail, String.valueOf(crawlerContentId), inputSourceLabel,
|
|
|
ProducePlanInputSourceTypeEnum.contentID.getVal());
|
|
|
}
|
|
|
return ReturnT.SUCCESS;
|