소스 검색

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

release_toaliyun_real
Stormeye Wu 7 년 전
부모
커밋
22ddc4b162
1개의 변경된 파일과 5개의 추가작업 그리고 1개의 파일을 삭제
  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 파일 보기

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


try { 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) { } catch (RuntimeException e) {
logger.error("此券减库存失败, couponId: " + couponIdStr); logger.error("此券减库存失败, couponId: " + couponIdStr);
throw new MallinkException(ErrorCode.ORDER_IS_FAIL); throw new MallinkException(ErrorCode.ORDER_IS_FAIL);


불러오는 중...
취소
저장