|
@@ -20,6 +20,7 @@ import com.tzld.longarticle.recommend.server.mapper.longArticle.LongArticleBaseM
|
|
|
import com.tzld.longarticle.recommend.server.model.dto.Content;
|
|
|
import com.tzld.longarticle.recommend.server.model.dto.ContentHisPublishArticle;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.aigc.CrawlerMetaArticle;
|
|
|
+import com.tzld.longarticle.recommend.server.model.entity.aigc.ProducePlanExeRecord;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.aigc.ProduceTaskAtom;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.aigc.PublishContent;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.crawler.AccountAvgInfo;
|
|
@@ -30,6 +31,7 @@ import com.tzld.longarticle.recommend.server.model.entity.longArticle.*;
|
|
|
import com.tzld.longarticle.recommend.server.model.param.TitleHisCacheParam;
|
|
|
import com.tzld.longarticle.recommend.server.remote.aigc.AIGCWaitingPublishContentService;
|
|
|
import com.tzld.longarticle.recommend.server.repository.aigc.CrawlerMetaArticleRepository;
|
|
|
+import com.tzld.longarticle.recommend.server.repository.aigc.ProducePlanExeRecordRepository;
|
|
|
import com.tzld.longarticle.recommend.server.repository.aigc.PublishContentRepository;
|
|
|
import com.tzld.longarticle.recommend.server.repository.aigc.PublishPlanRepository;
|
|
|
import com.tzld.longarticle.recommend.server.repository.crawler.AccountAvgInfoRepository;
|
|
@@ -112,6 +114,8 @@ public class RecallService implements ApplicationContextAware {
|
|
|
AigcBaseMapper aigcBaseMapper;
|
|
|
@Autowired
|
|
|
PublishPlanRepository publishPlanRepository;
|
|
|
+ @Autowired
|
|
|
+ ProducePlanExeRecordRepository producePlanExeRecordRepository;
|
|
|
|
|
|
private final Map<String, RecallStrategy> strategyMap = new HashMap<>();
|
|
|
private ApplicationContext applicationContext;
|
|
@@ -380,6 +384,7 @@ public class RecallService implements ApplicationContextAware {
|
|
|
if (CollectionUtils.isNotEmpty(articleWithHistory.getCategory())) {
|
|
|
content.setCategory(articleWithHistory.getCategory());
|
|
|
}
|
|
|
+ content.setProducePlanId(articleWithHistory.getProducePlanId());
|
|
|
content.setKimiSafeScore(articleWithHistory.getKimiSafeScore());
|
|
|
content.setRootPublishTimestamp(articleWithHistory.getRootPublishTimestamp());
|
|
|
for (ContentHisPublishArticle article : content.getHisPublishArticleList()) {
|
|
@@ -507,6 +512,10 @@ public class RecallService implements ApplicationContextAware {
|
|
|
.collect(Collectors.toMap(ArticleCategory::getChannelContentId, Function.identity(), (a, b) -> a));
|
|
|
Map<String, ArticleCategory> titleCategoryMap = articleCategoryList.stream()
|
|
|
.collect(Collectors.toMap(ArticleCategory::getTitleMd5, Function.identity(), (a, b) -> a));
|
|
|
+ // 获取生成计划
|
|
|
+ List<ProducePlanExeRecord> planExeRecordList = producePlanExeRecordRepository.findByPlanExeIdIn(sourceIds);
|
|
|
+ Map<String, ProducePlanExeRecord> planExeRecordMap = planExeRecordList.stream()
|
|
|
+ .collect(Collectors.toMap(ProducePlanExeRecord::getPlanExeId, Function.identity()));
|
|
|
// 根据sourceId查询kimiSafeScore
|
|
|
List<ProduceTaskAtom> safeScoreList = aigcBaseMapper.getProduceScoreByContentId(sourceIds);
|
|
|
Map<String, ProduceTaskAtom> safeScoreMap = safeScoreList.stream().filter(o -> StringUtils.hasText(o.getOutput()))
|
|
@@ -535,7 +544,11 @@ public class RecallService implements ApplicationContextAware {
|
|
|
res.setKimiSafeScore(safeScore);
|
|
|
}
|
|
|
}
|
|
|
- res.setProducePlanId(atom.getPlanId());
|
|
|
+ }
|
|
|
+ // 设置生成计划
|
|
|
+ ProducePlanExeRecord exeRecord = planExeRecordMap.get(cacheParam.getSourceId());
|
|
|
+ if (Objects.nonNull(exeRecord)) {
|
|
|
+ res.setProducePlanId(exeRecord.getPlanId());
|
|
|
}
|
|
|
// 溯源查找源发布时间
|
|
|
ArticlePoolPromotionSource source = sourceMap.get(cacheParam.getCrawlerChannelContentId());
|