Explorar el Código

[库存][修改]

release_toaliyun_real
Stormeye Wu hace 6 años
padre
commit
c719171e30
Se han modificado 1 ficheros con 1 adiciones y 7 borrados
  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 Ver fichero

@@ -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);


Cargando…
Cancelar
Guardar