mirror of
https://gitee.com/52itstyle/spring-boot-seckill.git
synced 2025-12-30 10:22:26 +00:00
:sparkles:微信高并发抢红包秒杀实战案例
This commit is contained in:
@@ -82,7 +82,7 @@ public class RedPacketService implements IRedPacketService {
|
||||
boolean res=false;
|
||||
try {
|
||||
/**
|
||||
* 获取锁 保证红包数量和计算红白金额的原子性操作
|
||||
* 获取锁 保证红包数量和计算红包金额的原子性操作
|
||||
*/
|
||||
res = RedissLockUtil.tryLock(redPacketId+"", TimeUnit.SECONDS, 3, 10);
|
||||
if(res){
|
||||
|
||||
Reference in New Issue
Block a user