摘要:
1、高并发场景,要避免请求操作数据库。用定时任务将数据定时更新到Redis中,请求直接查询Redis。 2、更新秒杀商品的库存时,可以通过where 库存 > 0来做一个乐观锁的效果。 MySQL 的InnoDB引擎 在更新行的时候会加行锁。 update seckill_product set s 阅读全文
摘要:
https://github.com/baomidou/mybatis-plus/issues/2585 在使用MP和Shardingsphere的某些版本中,可能会出现join 子查询表 取别名之后,在where中用这个别名报错 Can not find owner from table. // 阅读全文