|
@@ -125,8 +125,10 @@ public class DataFlushService {
|
|
|
List<LongArticlesCrawlerVideos> itemList = existsMap.get(o.getContentId());
|
|
|
return CollectionUtil.isEmpty(itemList) || itemList.size() < 3;
|
|
|
}).collect(Collectors.toList());
|
|
|
- longArticleBaseMapper.batchInsertLongArticlesCrawlerVideos(partition);
|
|
|
- flushNum += partition.size();
|
|
|
+ if (CollectionUtil.isNotEmpty(partition)) {
|
|
|
+ longArticleBaseMapper.batchInsertLongArticlesCrawlerVideos(partition);
|
|
|
+ flushNum += partition.size();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
log.info("flushLongArticlesCrawlerVideos flushNum:{}", flushNum);
|