|
|
|
@@ -628,7 +628,7 @@ public class WxOrderServiceImpl implements WxOrderService { |
|
|
|
try { |
|
|
|
//减库存,从redis中取,然后发mq消息同步到数据库 |
|
|
|
long stock = redisLock.decrease(EnumCacheKey.COUPON_STOCK.getMessage()+coupon.getId(), 1); |
|
|
|
if (stock <= 0 ) { |
|
|
|
if (stock < 0 ) { |
|
|
|
throw new MallinkException(ErrorCode.ORDER_IS_FAIL.getCode(),"券库存已为零!"); |
|
|
|
} |
|
|
|
UpdateCouponStockMsg msg = new UpdateCouponStockMsg(); |
|
|
|
|