Kaynağa Gözat

[库存][修改]

release_toaliyun_real
Stormeye Wu 6 yıl önce
ebeveyn
işleme
c719171e30
1 değiştirilmiş dosya ile 1 ekleme ve 7 silme
  1. +1
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java

+ 1
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Dosyayı Görüntüle

@@ -487,13 +487,7 @@ public class WxOrderServiceImpl implements WxOrderService {

try {
// 减库存
int num = wxCouponMapper.reduceInventory(coupon.getId(), 1, coupon.getRemainInventory());
if (num == 0) {
// 解锁
redisLock.unlock(couponIdStr, timeStr);
logger.error("此券减库存失败, couponId: " + couponIdStr);
throw new MallinkException(ErrorCode.ORDER_IS_FAIL);
}
wxCouponMapper.reduceInventory(coupon.getId(), 1, coupon.getRemainInventory());
} catch (RuntimeException e) {
// 解锁
redisLock.unlock(couponIdStr, timeStr);


Yükleniyor…
İptal
Kaydet