|
|
@@ -1654,6 +1654,12 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
userService.subLiveTuiMoney(liveOrder);
|
|
|
}
|
|
|
}
|
|
|
+ //优惠券返回
|
|
|
+ if(order.getUserCouponId()!=null){
|
|
|
+ // 退券
|
|
|
+ order.setCouponUserId(Long.parseLong(order.getUserId()));
|
|
|
+ this.refundCoupon(order);
|
|
|
+ }
|
|
|
// 删除限购记录
|
|
|
deletePurchaseLimitRecordsForLiveOrder(order);
|
|
|
|
|
|
@@ -4025,7 +4031,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
// 使用 productService.decProductStock 方法,该方法已包含库存检查逻辑
|
|
|
fsStoreProductService.decProductStock(productId, attrValueId, num);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private void checkPurchaseLimitForLiveOrder(Long userId, Long productId, Integer num) {
|
|
|
// 查询商品信息
|
|
|
FsStoreProductScrm product = fsStoreProductService.selectFsStoreProductById(productId);
|