爬虫代码优化

This commit is contained in:
xiongxiaoyang 2020-12-24 01:22:19 +08:00
parent c3daaecaaa
commit 6fd183c2ae
2 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ public class CrawlParser {
int indexNum = 0;
//总字数
Integer totalWordCount = 0;
Integer totalWordCount = book.getWordCount() == null ? 0 : book.getWordCount();
while (isFindIndex) {

View File

@ -5,7 +5,7 @@
<select id="queryNeedUpdateBook" resultType="com.java2nb.novel.entity.Book">
select id,crawl_source_id,crawl_book_id,crawl_last_time,pic_url
select id,crawl_source_id,crawl_book_id,crawl_last_time,pic_url,word_count
from book where last_index_update_time > #{startDate} and crawl_source_id is not null
order by crawl_last_time
limit ${limit}