resultMap修正
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user