Parcourir la source

[库存][修复]:减库存失败未处理

release_toaliyun_real
Stormeye Wu il y a 6 ans
Parent
révision
22ddc4b162
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. +5
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java

+ 5
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Voir le fichier

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

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


Chargement…
Annuler
Enregistrer