Ver Fonte

核销后赠券 取消掉有效期校验+退款

liudongzhi há 2 dias atrás
pai
commit
7c6471d0c4

+ 1 - 1
alien-store/src/main/java/shop/alien/store/service/impl/LifeDiscountCouponStoreFriendServiceImpl.java

@@ -588,7 +588,7 @@ public class LifeDiscountCouponStoreFriendServiceImpl extends ServiceImpl<LifeDi
                     // 设置查询条件:优惠券的ID等于当前遍历到的优惠券ID
                     queryWrapper.eq(LifeDiscountCoupon::getId, coupon.getCouponId());
                     // 设置查询条件:优惠券的结束日期大于等于当前日期,即优惠券在有效期内
-                    queryWrapper.ge(LifeDiscountCoupon::getValidDate, currentDate);
+//                    queryWrapper.ge(LifeDiscountCoupon::getValidDate, currentDate);
                     // 设置查询条件:优惠券还有库存
                     queryWrapper.and(w -> w.eq(LifeDiscountCoupon::getUnlimitedQty, 1)
                             .or()

+ 6 - 6
alien-store/src/main/java/shop/alien/store/service/impl/StoreReservationServiceImpl.java

@@ -762,12 +762,12 @@ public class StoreReservationServiceImpl extends ServiceImpl<StoreReservationMap
             throw new RuntimeException("预约已过期,无法核销");
         }
 
-        if(order.getOrderCostType() == 1){
-            //调用退款
-            MerchantPaymentStrategy strategy = merchantPaymentStrategyFactory.getStrategy(order.getPaymentMethod());
-            strategy.refund(order.getStoreId(), order.getOutTradeNo(), order.getDepositAmount().toString(), "已扫码到店商家退款", 3);
-
-        }
+//        if(order.getOrderCostType() == 1){
+//            //调用退款
+//            MerchantPaymentStrategy strategy = merchantPaymentStrategyFactory.getStrategy(order.getPaymentMethod());
+//            strategy.refund(order.getStoreId(), order.getOutTradeNo(), order.getDepositAmount().toString(), "已扫码到店商家退款", 3);
+//
+//        }
 
         // 更新预约状态为已到店(status = 2)
         reservation.setStatus(2); // 已到店