引入rabbitmq流量削峰,累积点击量后统一更新

This commit is contained in:
xiongxiaoyang
2020-05-25 21:06:51 +08:00
parent 5dbddbdd96
commit e4dd5bcb71
10 changed files with 197 additions and 7 deletions

View File

@ -7,6 +7,18 @@ spring:
include: alipay
rabbitmq:
enable: 0
host: 127.0.0.1
username: guest
password: guest
virtual-host: /novel-plus
template:
# 缺省的交换机名称此处配置后发送消息如果不指定交换机就会使用这个
exchange: novel.exchange
publisher-confirms: false
elasticsearch:
#是否开启搜索引擎1开启0不开启
enable: 0

View File

@ -35,7 +35,7 @@
</select>
<update id="addVisitCount" >
update book set visit_count = visit_count + 1 , update_time = #{date}
update book set visit_count = visit_count + 1
where id = #{bookId}
</update>