resultMap修正

This commit is contained in:
2025-11-25 13:08:23 +08:00
parent 61d63be941
commit 5d14957eba
8 changed files with 116 additions and 16 deletions

View File

@@ -323,7 +323,16 @@ public class NewsCrawlerTask extends PythonCommandTask {
// 自动发布并记录成功发布的 URL 集合
Set<String> publishedUrls = new HashSet<>();
if (taskMeta.getAutoPublish().booleanValue()){
publishedUrls = publishNewsToArticle(passDataResult.getDataList(), task, logId);
// 合并通过审核和未通过审核的采集项,都进行自动发布
// 通过审核的会发布为status=1未通过审核的会发布为status=4
List<TbDataCollectionItem> allItems = new ArrayList<>();
if (passDataResult.getDataList() != null) {
allItems.addAll(passDataResult.getDataList());
}
if (notPassDataResult.getDataList() != null) {
allItems.addAll(notPassDataResult.getDataList());
}
publishedUrls = publishNewsToArticle(allItems, task, logId);
}
Set<String> notPathUrls = new HashSet<>(notPassList.stream().map(TbDataCollectionItem::getSourceUrl).toList());