|  | @@ -32,10 +32,7 @@ import com.tzld.longarticle.recommend.server.remote.aigc.AIGCProducePlanDetailSe
 | 
											
												
													
														|  |  import com.tzld.longarticle.recommend.server.remote.aigc.AIGCProducePlanSaveService;
 |  |  import com.tzld.longarticle.recommend.server.remote.aigc.AIGCProducePlanSaveService;
 | 
											
												
													
														|  |  import com.tzld.longarticle.recommend.server.repository.aigc.PublishAccountRepository;
 |  |  import com.tzld.longarticle.recommend.server.repository.aigc.PublishAccountRepository;
 | 
											
												
													
														|  |  import com.tzld.longarticle.recommend.server.repository.crawler.PublishSortLogRepository;
 |  |  import com.tzld.longarticle.recommend.server.repository.crawler.PublishSortLogRepository;
 | 
											
												
													
														|  | -import com.tzld.longarticle.recommend.server.repository.longArticle.ArticlePoolPromotionSourceRepository;
 |  | 
 | 
											
												
													
														|  | -import com.tzld.longarticle.recommend.server.repository.longArticle.DatastatSortStrategyRepository;
 |  | 
 | 
											
												
													
														|  | -import com.tzld.longarticle.recommend.server.repository.longArticle.PublishSingleVideoSourceRepository;
 |  | 
 | 
											
												
													
														|  | -import com.tzld.longarticle.recommend.server.repository.longArticle.VideoTitleReWriteRepository;
 |  | 
 | 
											
												
													
														|  | 
 |  | +import com.tzld.longarticle.recommend.server.repository.longArticle.*;
 | 
											
												
													
														|  |  import com.tzld.longarticle.recommend.server.util.DateUtils;
 |  |  import com.tzld.longarticle.recommend.server.util.DateUtils;
 | 
											
												
													
														|  |  import com.tzld.longarticle.recommend.server.util.Md5Util;
 |  |  import com.tzld.longarticle.recommend.server.util.Md5Util;
 | 
											
												
													
														|  |  import com.tzld.longarticle.recommend.server.util.TitleSimilarCheckUtil;
 |  |  import com.tzld.longarticle.recommend.server.util.TitleSimilarCheckUtil;
 | 
											
										
											
												
													
														|  | @@ -89,6 +86,9 @@ public class ArticlePromotionService {
 | 
											
												
													
														|  |      AigcBaseMapper aigcBaseMapper;
 |  |      AigcBaseMapper aigcBaseMapper;
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
												
													
														|  |      VideoTitleReWriteRepository videoTitleReWriteRepository;
 |  |      VideoTitleReWriteRepository videoTitleReWriteRepository;
 | 
											
												
													
														|  | 
 |  | +    @Autowired
 | 
											
												
													
														|  | 
 |  | +    ArticleUnsafeTitleRepository articleUnsafeTitleRepository;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @ApolloJsonValue("${articlePromotionProduceConfig:{}}")
 |  |      @ApolloJsonValue("${articlePromotionProduceConfig:{}}")
 | 
											
												
													
														|  |      private Map<String, Map<String, Map<String, String>>> produceConfig;
 |  |      private Map<String, Map<String, Map<String, String>>> produceConfig;
 | 
											
												
													
														|  |      @Value("${topProducePlanId:}")
 |  |      @Value("${topProducePlanId:}")
 | 
											
										
											
												
													
														|  | @@ -505,7 +505,7 @@ public class ArticlePromotionService {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      private void articleAddDependPlan(String produceId, ProducePlanDetailVO detail, String inputSourceValue,
 |  |      private void articleAddDependPlan(String produceId, ProducePlanDetailVO detail, String inputSourceValue,
 | 
											
												
													
														|  | -                                      String inputSourceLabel, Integer inputSourceType) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                      String inputSourceLabel, Integer inputSourceType, List<ArticleUnsafeTitle> unsafeTitleList) {
 | 
											
												
													
														|  |          try {
 |  |          try {
 | 
											
												
													
														|  |              // 获取生产计划的详细信息
 |  |              // 获取生产计划的详细信息
 | 
											
												
													
														|  |              if (detail == null) {
 |  |              if (detail == null) {
 | 
											
										
											
												
													
														|  | @@ -520,8 +520,14 @@ public class ArticlePromotionService {
 | 
											
												
													
														|  |              // 获取依赖计划 ID 列表
 |  |              // 获取依赖计划 ID 列表
 | 
											
												
													
														|  |              List<ProducePlanInputSourceParam> inputSources = detail.getInputSourceGroups().get(0).getInputSources();
 |  |              List<ProducePlanInputSourceParam> inputSources = detail.getInputSourceGroups().get(0).getInputSources();
 | 
											
												
													
														|  |              List<String> dependValues = new ArrayList<>();
 |  |              List<String> dependValues = new ArrayList<>();
 | 
											
												
													
														|  | -            for (ProducePlanInputSourceParam inputSource : inputSources) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +            Iterator<ProducePlanInputSourceParam> iterator = inputSources.iterator();
 | 
											
												
													
														|  | 
 |  | +            while (iterator.hasNext()) {
 | 
											
												
													
														|  | 
 |  | +                ProducePlanInputSourceParam inputSource = iterator.next();
 | 
											
												
													
														|  |                  dependValues.add(inputSource.getInputSourceValue());
 |  |                  dependValues.add(inputSource.getInputSourceValue());
 | 
											
												
													
														|  | 
 |  | +                // 违规文章移除
 | 
											
												
													
														|  | 
 |  | +                if (unsafeTitleList.stream().anyMatch(unsafeTitle -> inputSource.getInputSourceLabel().contains(unsafeTitle.getTitle()))) {
 | 
											
												
													
														|  | 
 |  | +                    iterator.remove();
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |              // 如果计划 ID 已存在,直接返回
 |  |              // 如果计划 ID 已存在,直接返回
 | 
											
												
													
														|  |              if (dependValues.contains(inputSourceValue)) {
 |  |              if (dependValues.contains(inputSourceValue)) {
 | 
											
										
											
												
													
														|  | @@ -650,6 +656,7 @@ public class ArticlePromotionService {
 | 
											
												
													
														|  |          Map<String, Long> crawlerContentMap = crawlerContentList.stream().collect(Collectors.toMap(
 |  |          Map<String, Long> crawlerContentMap = crawlerContentList.stream().collect(Collectors.toMap(
 | 
											
												
													
														|  |                  CrawlerContent::getChannelContentId, CrawlerContent::getId));
 |  |                  CrawlerContent::getChannelContentId, CrawlerContent::getId));
 | 
											
												
													
														|  |          ProducePlanDetailVO detail = aigcProducePlanDetailService.articleGetProducePlanDetail(topProducePlanId);
 |  |          ProducePlanDetailVO detail = aigcProducePlanDetailService.articleGetProducePlanDetail(topProducePlanId);
 | 
											
												
													
														|  | 
 |  | +        List<ArticleUnsafeTitle> unsafeTitleList = articleUnsafeTitleRepository.getByStatus(1);
 | 
											
												
													
														|  |          int retryTimes = 5;
 |  |          int retryTimes = 5;
 | 
											
												
													
														|  |          while (Objects.isNull(detail) && retryTimes > 0) {
 |  |          while (Objects.isNull(detail) && retryTimes > 0) {
 | 
											
												
													
														|  |              detail = aigcProducePlanDetailService.articleGetProducePlanDetail(topProducePlanId);
 |  |              detail = aigcProducePlanDetailService.articleGetProducePlanDetail(topProducePlanId);
 | 
											
										
											
												
													
														|  | @@ -675,7 +682,7 @@ public class ArticlePromotionService {
 | 
											
												
													
														|  |                  continue;
 |  |                  continue;
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |              articleAddDependPlan(topProducePlanId, detail, String.valueOf(crawlerContentId), inputSourceLabel,
 |  |              articleAddDependPlan(topProducePlanId, detail, String.valueOf(crawlerContentId), inputSourceLabel,
 | 
											
												
													
														|  | -                    ProducePlanInputSourceTypeEnum.contentID.getVal());
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    ProducePlanInputSourceTypeEnum.contentID.getVal(), unsafeTitleList);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          return ReturnT.SUCCESS;
 |  |          return ReturnT.SUCCESS;
 | 
											
												
													
														|  |      }
 |  |      }
 |