优化更新策略,支持同时启动多个爬虫程序来加快小说更新速率

This commit is contained in:
xxy
2020-05-07 23:34:13 +08:00
parent 9df69edc2c
commit 0e2e610d18
4 changed files with 21 additions and 4 deletions

View File

@ -19,5 +19,13 @@
on t1.id = t2.book_id and t1.id = #{bookId}
</select>
<update id="updateCrawlLastTime">
update book set crawl_last_time = #{currentDate}
where id in
<foreach item="book" collection="books" open="(" separator="," close=")">
#{book.id}
</foreach>
</update>
</mapper>