skyline 1 ano atrás
pai
commit
62241cf107

+ 5 - 6
service/src/main/java/com/kym/service/factory/DiscountStrategyFactory.java

@@ -18,17 +18,16 @@ public class DiscountStrategyFactory {
 
     private static OrderRechargeRightsService orderRechargeRightsService;
     private static UserRechargeRightsService userRechargeRightsService;
-
     private static OrderCouponService orderCouponService;
     private static UserCouponService userCouponService;
     private static CouponService couponService;
 
     public DiscountStrategyFactory(OrderRechargeRightsService orderRechargeRightsService, UserRechargeRightsService userRechargeRightsService, OrderCouponService orderCouponService, UserCouponService userCouponService, CouponService couponService) {
-        this.orderRechargeRightsService = orderRechargeRightsService;
-        this.userRechargeRightsService = userRechargeRightsService;
-        this.orderCouponService = orderCouponService;
-        this.userCouponService = userCouponService;
-        this.couponService = couponService;
+        DiscountStrategyFactory.orderRechargeRightsService = orderRechargeRightsService;
+        DiscountStrategyFactory.userRechargeRightsService = userRechargeRightsService;
+        DiscountStrategyFactory.orderCouponService = orderCouponService;
+        DiscountStrategyFactory.userCouponService = userCouponService;
+        DiscountStrategyFactory.couponService = couponService;
     }
 
     public static DiscountService getDiscountStrategy(String discountType) {

+ 8 - 1
service/src/main/java/com/kym/service/miniapp/impl/ChargeOrderServiceImpl.java

@@ -215,12 +215,19 @@ public class ChargeOrderServiceImpl extends MyBaseServiceImpl<ChargeOrderMapper,
     @Override
     public Object orderDiscountDetail(String startChargeSeq, String discountType) {
         return switch (discountType) {
-            case Activity.DISCOUNT_TYPE_服务费折扣权益 -> userRechargeRightsService.getUserOrderRechargeRights(startChargeSeq);
+            case Activity.DISCOUNT_TYPE_服务费折扣权益 ->
+                    userRechargeRightsService.getUserOrderRechargeRights(startChargeSeq);
             case Activity.DISCOUNT_TYPE_优惠券 -> userCouponService.getUserOrderCoupon(startChargeSeq);
             default -> throw new BusinessException("未知的优惠类型");
         };
     }
 
+
+    /**
+     * 通过En+ sass关闭订单
+     *
+     * @param startChargeSeq
+     */
     @Override
     public void closeChargeOrder(String startChargeSeq) {
         Headers headers = Headers.of("satoken", redisTemplate.opsForValue().get(RedisKeys.EN_PLUS_SASS_TOKEN));