游戏获胜发券异常捕获处理
This commit is contained in:
parent
f18f4a3fd4
commit
2dedf2e835
@ -47,10 +47,18 @@ public class ActivityRechargeTicketService {
|
|||||||
);
|
);
|
||||||
|
|
||||||
String lockKey = String.format("lucky:draw:lock:%s:%s", userId, FIXED_ACTIVITY_ID);
|
String lockKey = String.format("lucky:draw:lock:%s:%s", userId, FIXED_ACTIVITY_ID);
|
||||||
distributedLockUtil.executeWithLock(lockKey, () -> {
|
try {
|
||||||
// 在锁内执行抽奖券发放逻辑
|
distributedLockUtil.executeWithLock(lockKey, () -> {
|
||||||
processTicketDistribution(userId);
|
// 在锁内执行抽奖券发放逻辑
|
||||||
});
|
try {
|
||||||
|
processTicketDistribution(userId);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("执行抽奖券发放失败:{}", e.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user