소스 검색

卓美-直播单退款返回优惠券

lxb 2 주 전
부모
커밋
0fa7397f82
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      fs-service/src/main/java/com/fs/live/service/impl/LiveOrderServiceImpl.java

+ 7 - 1
fs-service/src/main/java/com/fs/live/service/impl/LiveOrderServiceImpl.java

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