xhxu 3 лет назад
Родитель
Сommit
f565b72115
1 измененных файлов: 5 добавлений и 3 удалений
  1. +5
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java

+ 5
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Просмотреть файл

@@ -1042,7 +1042,9 @@ public class WxOrderServiceImpl implements WxOrderService {
boolean isChannelStockReduce = false;
boolean isChannelPrice = false;
Integer currentPrice = coupon.getSalePrice();
Long couponChannelId = null;
if (null != couponChannel ) {
couponChannelId = couponChannel.getId();
if (null != couponChannel.getChannelStock()) {
isChannelStockReduce = true;
}
@@ -1051,9 +1053,9 @@ public class WxOrderServiceImpl implements WxOrderService {
isChannelPrice = true;
}
}
if (isChannelStockReduce) {
setCouponChanenlStockCache(couponChannel.getId(), coupon.getTitle(),coupon.getTenantId());
setCouponChanenlStockCache(couponChannelId, coupon.getTitle(),coupon.getTenantId());
}else {
setCouponStockCache(coupon.getId(),coupon.getTitle(),coupon.getTenantId());
// 检查 优惠券 库存
@@ -1108,7 +1110,7 @@ public class WxOrderServiceImpl implements WxOrderService {
isReduceStock = false;
}
if (isReduceStock) {
wxOrderServiceHelper.reduceStock(isChannelStockReduce,coupon,couponChannel.getId(), number);
wxOrderServiceHelper.reduceStock(isChannelStockReduce,coupon,couponChannelId, number);
}
reduceResult.setChannelStockReduce(isChannelStockReduce);
reduceResult.setCurrentPrice(currentPrice);


Загрузка…
Отмена
Сохранить