领取优惠券操作
This commit is contained in:
@@ -374,11 +374,12 @@ public class OrderService {
|
|||||||
if (Objects.isNull(userCoupons) || userCoupons.getIsDouble().equals("true")){
|
if (Objects.isNull(userCoupons) || userCoupons.getIsDouble().equals("true")){
|
||||||
throw new MsgException("该优惠券翻倍已领取");
|
throw new MsgException("该优惠券翻倍已领取");
|
||||||
}
|
}
|
||||||
|
modityDouble(conponsId);
|
||||||
return Result.success(CodeEnum.SUCCESS);
|
return Result.success(CodeEnum.SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void modityDouble(Integer conponsId) throws ParseException {
|
private void modityDouble(Integer conponsId) {
|
||||||
|
|
||||||
boolean lock_coin = redisUtils.lock(RedisCst.COUPONS_COIN_KEY + conponsId, 5000, TimeUnit.MILLISECONDS);
|
boolean lock_coin = redisUtils.lock(RedisCst.COUPONS_COIN_KEY + conponsId, 5000, TimeUnit.MILLISECONDS);
|
||||||
if (lock_coin) {
|
if (lock_coin) {
|
||||||
|
|||||||
Reference in New Issue
Block a user