Ver código fonte

清理充电相关代码

skyline 2 dias atrás
pai
commit
9107e2f6e0
32 arquivos alterados com 13 adições e 972 exclusões
  1. 3 3
      admin-web/src/views/admin/ordering/dialog.vue
  2. 1 18
      car-wash-admin/src/main/java/com/kym/admin/controller/ActivityController.java
  3. 0 1
      car-wash-entity/src/main/java/com/kym/entity/Activity.java
  4. 0 60
      car-wash-entity/src/main/java/com/kym/entity/OrderRechargeRights.java
  5. 0 99
      car-wash-entity/src/main/java/com/kym/entity/RechargeRights.java
  6. 0 97
      car-wash-entity/src/main/java/com/kym/entity/UserRechargeRights.java
  7. 1 1
      car-wash-entity/src/main/java/com/kym/entity/WashOrder.java
  8. 1 2
      car-wash-entity/src/main/java/com/kym/entity/delay/DelayActivity.java
  9. 0 7
      car-wash-entity/src/main/java/com/kym/entity/vo/ActivityVo.java
  10. 0 99
      car-wash-entity/src/main/java/com/kym/entity/vo/UserOrderRechargeRightsVo.java
  11. 0 19
      car-wash-entity/src/main/java/com/kym/entity/vo/UserRightsAndCouponsVo.java
  12. 0 16
      car-wash-mapper/src/main/java/com/kym/mapper/OrderRechargeRightsMapper.java
  13. 0 16
      car-wash-mapper/src/main/java/com/kym/mapper/RechargeRightsMapper.java
  14. 0 1
      car-wash-mapper/src/main/java/com/kym/mapper/UserCouponMapper.java
  15. 0 22
      car-wash-mapper/src/main/java/com/kym/mapper/UserRechargeRightsMapper.java
  16. 0 44
      car-wash-mapper/src/main/resources/mappers/UserRechargeRightsMapper.xml
  17. 0 21
      car-wash-miniapp/src/main/java/com/kym/miniapp/controller/AccountController.java
  18. 0 18
      car-wash-miniapp/src/main/java/com/kym/miniapp/controller/OrderRechargeRightsController.java
  19. 0 41
      car-wash-miniapp/src/main/java/com/kym/miniapp/controller/RechargeRightsController.java
  20. 1 22
      car-wash-miniapp/src/main/java/com/kym/miniapp/jobs/UserDiscountExpiredJob.java
  21. 0 4
      car-wash-service/src/main/java/com/kym/service/AccountService.java
  22. 0 2
      car-wash-service/src/main/java/com/kym/service/ActivityService.java
  23. 0 17
      car-wash-service/src/main/java/com/kym/service/OrderRechargeRightsService.java
  24. 0 22
      car-wash-service/src/main/java/com/kym/service/RechargeRightsService.java
  25. 0 24
      car-wash-service/src/main/java/com/kym/service/UserRechargeRightsService.java
  26. 0 62
      car-wash-service/src/main/java/com/kym/service/impl/AccountServiceImpl.java
  27. 2 74
      car-wash-service/src/main/java/com/kym/service/impl/ActivityServiceImpl.java
  28. 0 20
      car-wash-service/src/main/java/com/kym/service/impl/OrderRechargeRightsServiceImpl.java
  29. 0 60
      car-wash-service/src/main/java/com/kym/service/impl/RechargeRightsServiceImpl.java
  30. 0 55
      car-wash-service/src/main/java/com/kym/service/impl/UserRechargeRightsServiceImpl.java
  31. 0 2
      car-wash-service/src/main/java/com/kym/service/wechat/WxPayService.java
  32. 4 23
      car-wash-service/src/main/java/com/kym/service/wechat/impl/WxPayServiceImpl.java

+ 3 - 3
admin-web/src/views/admin/ordering/dialog.vue

@@ -148,10 +148,10 @@
               class="wd350">
           </el-input>
         </el-form-item>
-        <el-form-item label="优惠方式:RechargeRights-充值权益 Coupon-优惠券" prop="discountType">
+        <el-form-item label="Coupon-优惠券" prop="discountType">
           <el-input
               v-model="state.ruleForm.discountType"
-              placeholder="优惠方式:RechargeRights-充值权益 Coupon-优惠券"
+              placeholder="Coupon-优惠券"
               clearable
               class="wd350">
           </el-input>
@@ -400,4 +400,4 @@ defineExpose({
 });
 
 
-</script>
+</script>

+ 1 - 18
car-wash-admin/src/main/java/com/kym/admin/controller/ActivityController.java

@@ -3,10 +3,8 @@ package com.kym.admin.controller;
 import com.kym.common.R;
 import com.kym.common.annotation.SysLog;
 import com.kym.entity.queryParams.ActivityQueryParam;
-import com.kym.entity.common.PageParams;
 import com.kym.entity.vo.ActivityVo;
 import com.kym.service.ActivityService;
-import com.kym.service.RechargeRightsService;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -23,11 +21,8 @@ public class ActivityController {
 
     private final ActivityService activityService;
 
-    private final RechargeRightsService rechargeRightsService;
-
-    public ActivityController(ActivityService activityService, RechargeRightsService rechargeRightsService) {
+    public ActivityController(ActivityService activityService) {
         this.activityService = activityService;
-        this.rechargeRightsService = rechargeRightsService;
     }
 
 
@@ -57,16 +52,4 @@ public class ActivityController {
         return R.success();
     }
 
-    /**
-     * 充值权益列表
-     *
-     * @param pageParams
-     * @param activityId
-     * @return
-     */
-    @GetMapping("/listRechargeRight")
-    R<?> listRechargeRight(@ModelAttribute PageParams pageParams, @RequestParam(value = "activityId", required = false) String activityId) {
-        return R.success(rechargeRightsService.listRechargeRight(pageParams, activityId));
-    }
-
 }

+ 0 - 1
car-wash-entity/src/main/java/com/kym/entity/Activity.java

@@ -23,7 +23,6 @@ import lombok.experimental.Accessors;
 @Accessors(chain = true)
 public class Activity extends BaseEntity {
 
-    public final static String DISCOUNT_TYPE_服务费折扣权益 = "RechargeRights";
     public final static String DISCOUNT_TYPE_优惠券 = "Coupon";
     public final static String DISCOUNT_TYPE_洗车日 = "WashDay";
 

+ 0 - 60
car-wash-entity/src/main/java/com/kym/entity/OrderRechargeRights.java

@@ -1,60 +0,0 @@
-package com.kym.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.kym.entity.BaseEntity;
-import java.io.Serializable;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.experimental.Accessors;
-
-/**
- * <p>
- * 订单充值权益表
- * </p>
- *
- * @author skyline
- * @since 2023-10-19
- */
-@Getter
-@Setter
-@TableName("t_order_recharge_rights")
-@Accessors(chain = true)
-public class OrderRechargeRights extends BaseEntity {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 充值权益id
-     */
-    private Long rightsId;
-
-    /**
-     * 主活动id
-     */
-    private Long activityId;
-
-    /**
-     * 用户充值权益id
-     */
-    private Long userRightsId;
-
-    /**
-     * 用户id
-     */
-    private Long userId;
-
-    /**
-     * 充电订单号
-     */
-    private String startChargeSeq;
-
-    /**
-     * 折扣:100代表无折扣,75代表75折
-     */
-    private Integer discount;
-
-    /**
-     * 总优惠金额(分)
-     */
-    private Integer discountAmount;
-}

+ 0 - 99
car-wash-entity/src/main/java/com/kym/entity/RechargeRights.java

@@ -1,99 +0,0 @@
-package com.kym.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.kym.entity.BaseEntity;
-import java.io.Serializable;
-import java.time.LocalDateTime;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.experimental.Accessors;
-
-/**
- * <p>
- * 充值权益表
- * </p>
- *
- * @author skyline
- * @since 2023-10-18
- */
-@Getter
-@Setter
-@TableName("t_recharge_rights")
-@Accessors(chain = true)
-public class RechargeRights extends BaseEntity {
-
-    private static final long serialVersionUID = 1L;
-
-    public final static int STATUS_未开始 = 0;
-    public final static int STATUS_进行中 = 1;
-    public final static int STATUS_已结束 = 2;
-    public final static int STATUS_已取消 = 3;
-
-    /**
-     * 主活动id(继承自活动主表)
-     */
-    private Long activityId;
-
-    /**
-     * 活动名称(继承自活动主表)
-     */
-    private String name;
-
-    /**
-     * 权益描述
-     */
-    private String rightsDesc;
-
-    /**
-     * 开始时间(继承自活动主表)
-     */
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime startTime;
-
-    /**
-     * 结束时间(继承自活动主表)
-     */
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime endTime;
-
-    /**
-     * 有效期(天)
-     */
-    private Integer validity;
-
-    /**
-     * 充值最小金额
-     */
-    private Integer amountMin;
-
-    /**
-     * 充值最大金额
-     */
-    private Integer amountMax;
-
-    /**
-     * 折扣:100代表无折扣,75代表75折
-     */
-    private Integer discount;
-
-    /**
-     * 优惠允许叠加:0-不允许,1-允许(继承自活动主表)
-     */
-    private Integer allowStacke;
-
-    /**
-     * 数量限制(继承自活动主表)
-     */
-    private Integer quantity;
-
-    /**
-     * 活动状态:0-未开始,1-进行中,2-已结束,3-已取消(继承自活动主表)
-     */
-    private Integer status;
-
-    /**
-     * 备注
-     */
-    private String remark;
-}

+ 0 - 97
car-wash-entity/src/main/java/com/kym/entity/UserRechargeRights.java

@@ -1,97 +0,0 @@
-package com.kym.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.kym.entity.BaseEntity;
-import java.io.Serializable;
-import java.time.LocalDateTime;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.experimental.Accessors;
-
-/**
- * <p>
- * 用户充值权益详情表
- * </p>
- *
- * @author skyline
- * @since 2023-10-18
- */
-@Getter
-@Setter
-@TableName("t_user_recharge_rights")
-@Accessors(chain = true)
-public class UserRechargeRights extends BaseEntity {
-
-    private static final long serialVersionUID = 1L;
-
-    public final static int STATUS_无效 = 0;
-    public final static int STATUS_有效 = 1;
-
-    /**
-     * 充值权益id
-     */
-    private Long rightsId;
-
-    /**
-     * 主活动id
-     */
-    private Long activityId;
-
-    /**
-     * 用户id
-     */
-    private Long userId;
-
-    /**
-     * 开始时间
-     */
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime startTime;
-
-    /**
-     * 结束时间
-     */
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime endTime;
-
-    /**
-     * 权益余额(分)
-     */
-    private Integer rightsBalance;
-
-    /**
-     * 冻结余额(分)
-     */
-    private Integer frozenBalance;
-
-    /**
-     * 折扣:100代表无折扣,75代表75折
-     */
-    private Integer discount;
-
-    /**
-     * 优惠允许叠加:0-不允许,1-允许
-     */
-    private Integer allowStacke;
-
-    /**
-     * 总优惠金额(分)
-     */
-    private Integer discountAmount;
-
-    /**
-     * 使用次数
-     */
-    private Integer times;
-
-    /**
-     * 状态:0-无效,1-有效
-     */
-    private Integer status;
-
-    /**
-     * 备注
-     */
-    private String remark;
-}

+ 1 - 1
car-wash-entity/src/main/java/com/kym/entity/WashOrder.java

@@ -148,7 +148,7 @@ public class WashOrder extends BaseEntity {
     private Long totalSeconds;
 
     /**
-     * 优惠方式:RechargeRights-充值权益 Coupon-优惠券
+     * 优惠方式:Coupon-优惠券
      */
     private String discountType;
 

+ 1 - 2
car-wash-entity/src/main/java/com/kym/entity/delay/DelayActivity.java

@@ -46,9 +46,8 @@ public class DelayActivity implements Serializable {
 
     /**
      * 折扣类型:
-     * 充值权益:RechargeRights
      * 优惠券:Coupon
      */
-    private String discountType = "RechargeRights";
+    private String discountType;
 
 }

+ 0 - 7
car-wash-entity/src/main/java/com/kym/entity/vo/ActivityVo.java

@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import com.kym.entity.BaseEntity;
 import com.kym.entity.Banner;
 import com.kym.entity.Coupon;
-import com.kym.entity.RechargeRights;
 import lombok.Data;
 
 import java.time.LocalDateTime;
@@ -95,12 +94,6 @@ public class ActivityVo extends BaseEntity {
      */
     List<String> stationIds;
 
-
-    /**
-     * 充值权益列表
-     */
-    List<RechargeRights> rechargeRightsList;
-
     /**
      * 优惠券列表
      */

+ 0 - 99
car-wash-entity/src/main/java/com/kym/entity/vo/UserOrderRechargeRightsVo.java

@@ -1,99 +0,0 @@
-package com.kym.entity.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.kym.entity.BaseEntity;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.time.LocalDateTime;
-
-/**
- * <p>
- * 用户订单权益
- * </p>
- *
- * @author skyline
- * @since 2023-10-18
- */
-@Data
-@Accessors(chain = true)
-public class UserOrderRechargeRightsVo extends BaseEntity {
-
-    private static final long serialVersionUID = 1L;
-    /**
-     * 充值权益id
-     */
-    private Long rightsId;
-
-    /**
-     * 主活动id
-     */
-    private Long activityId;
-
-    /**
-     * 用户id
-     */
-    private Long userId;
-
-    /**
-     * 开始时间
-     */
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime startTime;
-
-    /**
-     * 结束时间
-     */
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime endTime;
-
-    /**
-     * 权益余额(分)
-     */
-    private Integer rightsBalance;
-
-    /**
-     * 冻结余额(分)
-     */
-    private Integer frozenBalance;
-
-    /**
-     * 折扣:100代表无折扣,75代表75折
-     */
-    private Integer discount;
-
-    /**
-     * 优惠允许叠加:0-不允许,1-允许
-     */
-    private Integer allowStacke;
-
-    /**
-     * 总优惠金额(分)
-     */
-    private Integer discountAmount;
-
-    /**
-     * 使用次数
-     */
-    private Integer times;
-
-    /**
-     * 状态:0-无效,1-有效
-     */
-    private Integer status;
-
-    /**
-     * 备注
-     */
-    private String remark;
-
-    /**
-     * 订单号
-     */
-    private String startChargeSeq;
-
-    /**
-     * 订单优惠金额(分)
-     */
-    private Integer orderDiscountAmount;
-}

+ 0 - 19
car-wash-entity/src/main/java/com/kym/entity/vo/UserRightsAndCouponsVo.java

@@ -1,19 +0,0 @@
-package com.kym.entity.vo;
-
-import com.kym.entity.UserCoupon;
-import com.kym.entity.UserRechargeRights;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.util.List;
-
-/**
- * 用户权益和优惠券
- */
-@Data
-@Accessors(chain = true)
-public class UserRightsAndCouponsVo {
-    public Long userId;
-    public List<UserRechargeRights> userRechargeRightsList;
-    public List<UserCoupon> userCouponList;
-}

+ 0 - 16
car-wash-mapper/src/main/java/com/kym/mapper/OrderRechargeRightsMapper.java

@@ -1,16 +0,0 @@
-package com.kym.mapper;
-
-import com.github.yulichang.base.MPJBaseMapper;
-import com.kym.entity.OrderRechargeRights;
-
-/**
- * <p>
- * 订单充值权益表 Mapper 接口
- * </p>
- *
- * @author skyline
- * @since 2023-10-19
- */
-public interface OrderRechargeRightsMapper extends MPJBaseMapper<OrderRechargeRights> {
-
-}

+ 0 - 16
car-wash-mapper/src/main/java/com/kym/mapper/RechargeRightsMapper.java

@@ -1,16 +0,0 @@
-package com.kym.mapper;
-
-import com.github.yulichang.base.MPJBaseMapper;
-import com.kym.entity.RechargeRights;
-
-/**
- * <p>
- * 充值权益表 Mapper 接口
- * </p>
- *
- * @author skyline
- * @since 2023-10-18
- */
-public interface RechargeRightsMapper extends MPJBaseMapper<RechargeRights> {
-
-}

+ 0 - 1
car-wash-mapper/src/main/java/com/kym/mapper/UserCouponMapper.java

@@ -2,7 +2,6 @@ package com.kym.mapper;
 
 import com.github.yulichang.base.MPJBaseMapper;
 import com.kym.entity.UserCoupon;
-import com.kym.entity.UserRechargeRights;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;

+ 0 - 22
car-wash-mapper/src/main/java/com/kym/mapper/UserRechargeRightsMapper.java

@@ -1,22 +0,0 @@
-package com.kym.mapper;
-
-import com.github.yulichang.base.MPJBaseMapper;
-import com.kym.entity.UserRechargeRights;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * <p>
- * 用户充值权益详情表 Mapper 接口
- * </p>
- *
- * @author skyline
- * @since 2023-10-18
- */
-public interface UserRechargeRightsMapper extends MPJBaseMapper<UserRechargeRights> {
-
-    List<UserRechargeRights> listStationAvailableRights(@Param("params") Map<String, ?> params);
-
-}

+ 0 - 44
car-wash-mapper/src/main/resources/mappers/UserRechargeRightsMapper.xml

@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.kym.mapper.UserRechargeRightsMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.kym.entity.UserRechargeRights">
-        <id column="id" property="id" />
-        <result column="company_id" property="companyId" />
-        <result column="rights_id" property="rightsId" />
-        <result column="activity_id" property="activityId" />
-        <result column="user_id" property="userId" />
-        <result column="start_time" property="startTime" />
-        <result column="end_time" property="endTime" />
-        <result column="rights_balance" property="rightsBalance" />
-        <result column="frozen_balance" property="frozenBalance" />
-        <result column="discount" property="discount" />
-        <result column="allow_stacke" property="allowStacke" />
-        <result column="discount_amount" property="discountAmount" />
-        <result column="times" property="times" />
-        <result column="status" property="status" />
-        <result column="remark" property="remark" />
-        <result column="create_time" property="createTime" />
-        <result column="update_time" property="updateTime" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        id,company_id,rights_id, activity_id, user_id, start_time, end_time, rights_balance, frozen_balance, discount, allow_stacke, discount_amount, times, status, remark,create_time,update_time
-    </sql>
-
-    <select id="listStationAvailableRights" resultMap="BaseResultMap" parameterType="java.util.Map" >
-        SELECT
-            t1.*
-        FROM
-            car_wash.`t_user_recharge_rights` t1
-                LEFT JOIN charge_admin.`t_activity_station` t2
-                          ON t1.`activity_id` = t2.`activity_id`
-        WHERE t1.`user_id` = #{params.userId}
-          AND t1.`status` = 1
-          AND t2.`station_id` = #{params.stationId}
-        ORDER BY  t1.`end_time` ASC
-    </select>
-
-</mapper>

+ 0 - 21
car-wash-miniapp/src/main/java/com/kym/miniapp/controller/AccountController.java

@@ -78,25 +78,4 @@ public class AccountController {
         return R.success(refundLogService.listRefundLogForApp(params));
     }
 
-
-    /**
-     * 获取当前用户有效的权益和优惠券
-     *
-     * @return
-     */
-    @GetMapping("/listRightsAndCoupons")
-    public R<?> listRightsAndCoupons() {
-        return R.success(accountService.listRightsAndCoupons());
-    }
-
-    /**
-     * 获取当前用户当前站点有效的权益和优惠券
-     *
-     * @return
-     */
-    @GetMapping("/listStationAvailableRightsAndCoupons")
-    public R<?> listStationAvailableRightsAndCoupons(@RequestParam(value = "stationId") String stationId) {
-        return R.success(accountService.listStationAvailableRightsAndCoupons(stationId));
-    }
-
 }

+ 0 - 18
car-wash-miniapp/src/main/java/com/kym/miniapp/controller/OrderRechargeRightsController.java

@@ -1,18 +0,0 @@
-package com.kym.miniapp.controller;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- * 订单充值权益表 前端控制器
- * </p>
- *
- * @author skyline
- * @since 2023-10-19
- */
-@RestController
-@RequestMapping("/order-recharge-rights")
-public class OrderRechargeRightsController {
-
-}

+ 0 - 41
car-wash-miniapp/src/main/java/com/kym/miniapp/controller/RechargeRightsController.java

@@ -1,41 +0,0 @@
-package com.kym.miniapp.controller;
-
-import com.kym.common.R;
-import com.kym.entity.queryParams.RightsQueryParam;
-import com.kym.service.RechargeRightsService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- * 用户优惠券 前端控制器
- * </p>
- *
- * @author skyline
- * @since 2024-04-29
- */
-@RestController
-@RequestMapping("/rechargeRights")
-public class RechargeRightsController {
-
-    private final RechargeRightsService rechargeRightsService;
-
-
-    public RechargeRightsController(RechargeRightsService rechargeRightsService) {
-        this.rechargeRightsService = rechargeRightsService;
-    }
-
-    /**
-     * 获取当前站点参与的充值权益活动列表
-     *
-     * @param params
-     * @return
-     */
-    @GetMapping(value = "/listAvailableRechargeRights")
-    public R<?> listAvailableCoupons(@ModelAttribute RightsQueryParam params) {
-        return R.success(rechargeRightsService.listAvailableRechargeRights(params));
-    }
-
-}

+ 1 - 22
car-wash-miniapp/src/main/java/com/kym/miniapp/jobs/UserDiscountExpiredJob.java

@@ -2,9 +2,7 @@ package com.kym.miniapp.jobs;
 
 import com.kym.common.utils.CommUtil;
 import com.kym.entity.UserCoupon;
-import com.kym.entity.UserRechargeRights;
 import com.kym.service.UserCouponService;
-import com.kym.service.UserRechargeRightsService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
@@ -20,31 +18,12 @@ import java.time.LocalDateTime;
 @Slf4j
 public class UserDiscountExpiredJob {
 
-    private final UserRechargeRightsService userRechargeRightsService;
-
     private final UserCouponService userCouponService;
 
-    public UserDiscountExpiredJob(UserRechargeRightsService userRechargeRightsService, UserCouponService userCouponService) {
-        this.userRechargeRightsService = userRechargeRightsService;
+    public UserDiscountExpiredJob(UserCouponService userCouponService) {
         this.userCouponService = userCouponService;
     }
 
-    // 每天凌晨0点执行一次
-    @Scheduled(cron = "0 0 0 * * ?")
-    public void executeUserRechargeRightsJob() {
-        log.info("用户权益卡到期处理启动...");
-        var list = userRechargeRightsService.lambdaQuery()
-                .eq(UserRechargeRights::getStatus, UserRechargeRights.STATUS_有效)
-                .le(UserRechargeRights::getEndTime, LocalDateTime.now())
-                .list();
-        if (!CommUtil.isEmptyOrNull(list)) {
-            userRechargeRightsService.lambdaUpdate()
-                    .set(UserRechargeRights::getStatus, UserRechargeRights.STATUS_无效)
-                    .in(UserRechargeRights::getId, list.stream().map(UserRechargeRights::getId).toList())
-                    .update();
-        }
-        log.info("用户权益卡到期处理结束,共处理{}条数据", list.size());
-    }
 
     @Scheduled(cron = "0 0 0 * * ?")
     public void executeUserCouponJob() {

+ 0 - 4
car-wash-service/src/main/java/com/kym/service/AccountService.java

@@ -2,7 +2,6 @@ package com.kym.service;
 
 import com.github.yulichang.base.MPJBaseService;
 import com.kym.entity.Account;
-import com.kym.entity.vo.UserRightsAndCouponsVo;
 
 /**
  * <p>
@@ -16,7 +15,4 @@ public interface AccountService extends MPJBaseService<Account> {
 
     Account getAccountByUserId(Long userId);
 
-    UserRightsAndCouponsVo listRightsAndCoupons();
-
-    UserRightsAndCouponsVo listStationAvailableRightsAndCoupons(String stationId);
 }

+ 0 - 2
car-wash-service/src/main/java/com/kym/service/ActivityService.java

@@ -23,6 +23,4 @@ public interface ActivityService extends MPJBaseService<Activity> {
     ActivityVo activityDetail(String params);
 
     void terminateActivity(String activityId);
-
-    void handleRechargeActivity(long userId, int rechargeAmount);
 }

+ 0 - 17
car-wash-service/src/main/java/com/kym/service/OrderRechargeRightsService.java

@@ -1,17 +0,0 @@
-package com.kym.service;
-
-
-import com.github.yulichang.base.MPJBaseService;
-import com.kym.entity.OrderRechargeRights;
-
-/**
- * <p>
- * 订单充值权益表 服务类
- * </p>
- *
- * @author skyline
- * @since 2023-10-19
- */
-public interface OrderRechargeRightsService extends MPJBaseService<OrderRechargeRights> {
-
-}

+ 0 - 22
car-wash-service/src/main/java/com/kym/service/RechargeRightsService.java

@@ -1,22 +0,0 @@
-package com.kym.service;
-
-import com.github.yulichang.base.MPJBaseService;
-import com.kym.entity.RechargeRights;
-import com.kym.entity.queryParams.RightsQueryParam;
-import com.kym.entity.common.PageBean;
-import com.kym.entity.common.PageParams;
-
-/**
- * <p>
- * 充值权益表 服务类
- * </p>
- *
- * @author skyline
- * @since 2023-10-18
- */
-public interface RechargeRightsService extends MPJBaseService<RechargeRights> {
-
-    PageBean<RechargeRights> listAvailableRechargeRights(RightsQueryParam params);
-
-    PageBean<RechargeRights> listRechargeRight(PageParams pageParams, String activityId);
-}

+ 0 - 24
car-wash-service/src/main/java/com/kym/service/UserRechargeRightsService.java

@@ -1,24 +0,0 @@
-package com.kym.service;
-
-import com.github.yulichang.base.MPJBaseService;
-import com.kym.entity.UserRechargeRights;
-import com.kym.entity.vo.UserOrderRechargeRightsVo;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * <p>
- * 用户充值权益详情表 服务类
- * </p>
- *
- * @author skyline
- * @since 2023-10-18
- */
-public interface UserRechargeRightsService extends MPJBaseService<UserRechargeRights> {
-
-    UserOrderRechargeRightsVo getUserOrderRechargeRights(String startChargeSeq);
-
-    List<UserRechargeRights> listStationAvailableRights(Map<String, ?> params);
-
-}

+ 0 - 62
car-wash-service/src/main/java/com/kym/service/impl/AccountServiceImpl.java

@@ -1,18 +1,11 @@
 package com.kym.service.impl;
 
-import cn.dev33.satoken.stp.StpUtil;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.kym.entity.Account;
-import com.kym.entity.UserCoupon;
-import com.kym.entity.UserRechargeRights;
-import com.kym.entity.vo.UserRightsAndCouponsVo;
 import com.kym.mapper.AccountMapper;
 import com.kym.service.AccountService;
-import com.kym.service.UserCouponService;
-import com.kym.service.UserRechargeRightsService;
 import org.springframework.stereotype.Service;
 
-import java.util.Map;
 
 /**
  * <p>
@@ -25,65 +18,10 @@ import java.util.Map;
 @Service
 public class AccountServiceImpl extends MPJBaseServiceImpl<AccountMapper, Account> implements AccountService {
 
-    private final UserRechargeRightsService userRechargeRightsService;
-
-    private final UserCouponService userCouponService;
-
-    public AccountServiceImpl(UserRechargeRightsService userRechargeRightsService, UserCouponService userCouponService) {
-        this.userRechargeRightsService = userRechargeRightsService;
-        this.userCouponService = userCouponService;
-    }
 
     @Override
     public Account getAccountByUserId(Long userId) {
         return lambdaQuery().eq(Account::getUserId, userId).one();
     }
 
-    /**
-     * 获取用户权益和优惠券
-     *
-     * @return
-     */
-    @Override
-    public UserRightsAndCouponsVo listRightsAndCoupons() {
-        var vo = new UserRightsAndCouponsVo();
-        var userId = StpUtil.getLoginIdAsLong();
-        vo.setUserId(userId);
-
-        // 当前用户的充电权益(含已失效)
-        var userRechargeRight = userRechargeRightsService.lambdaQuery()
-                .eq(UserRechargeRights::getUserId, userId)
-                .orderByDesc(UserRechargeRights::getStatus)
-                .orderByAsc(UserRechargeRights::getEndTime)
-                .list();
-        vo.setUserRechargeRightsList(userRechargeRight);
-
-        // 当前用户的优惠券列表(含已失效)
-        var usesrCouponList = userCouponService.lambdaQuery()
-                .eq(UserCoupon::getUserId, userId)
-                .orderByDesc(UserCoupon::getStatus)
-                .orderByAsc(UserCoupon::getUsageStatus)
-                .orderByAsc(UserCoupon::getEndTime)
-                .list();
-        vo.setUserCouponList(usesrCouponList);
-
-        return vo;
-    }
-
-    @Override
-    public UserRightsAndCouponsVo listStationAvailableRightsAndCoupons(String stationId) {
-        var vo = new UserRightsAndCouponsVo();
-        var userId = StpUtil.getLoginIdAsLong();
-        vo.setUserId(userId);
-        // 当前用户有效的充电权益
-        var userRechargeRights = userRechargeRightsService.listStationAvailableRights(Map.of("userId", userId, "stationId", stationId));
-        vo.setUserRechargeRightsList(userRechargeRights);
-
-        // 当前用户有效的优惠券列表
-        var userCouponList = userCouponService.listStationAvailableCoupons(Map.of("userId", userId, "stationId", stationId));
-        vo.setUserCouponList(userCouponList);
-        return vo;
-    }
-
-
 }

+ 2 - 74
car-wash-service/src/main/java/com/kym/service/impl/ActivityServiceImpl.java

@@ -9,20 +9,14 @@ import com.kym.entity.queryParams.ActivityQueryParam;
 import com.kym.entity.vo.ActivityVo;
 import com.kym.entity.common.PageBean;
 import com.kym.entity.common.RedisKeys;
-import com.kym.entity.UserRechargeRights;
 import com.kym.mapper.ActivityMapper;
 import com.kym.service.*;
-import com.kym.service.UserRechargeRightsService;
 import com.kym.service.mybatisplus.MyBaseServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-
-import java.time.LocalDateTime;
-import java.time.LocalTime;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -42,20 +36,15 @@ import static com.kym.entity.Activity.*;
 public class ActivityServiceImpl extends MyBaseServiceImpl<ActivityMapper, Activity> implements ActivityService {
 
     private final ActivityStationService activityStationService;
-    private final RechargeRightsService rechargeRightsService;
-    private final UserRechargeRightsService userRechargeRightsService;
     private final BannerService bannerService;
     private final CouponService couponService;
 
     private final RedisTemplate<String, String> redisTemplate;
 
 
-    public ActivityServiceImpl(ActivityStationService activityStationService, RechargeRightsService rechargeRightsService,
-                               UserRechargeRightsService userRechargeRightsService,
+    public ActivityServiceImpl(ActivityStationService activityStationService,
                                BannerService bannerService, CouponService couponService, RedisTemplate<String, String> redisTemplate) {
         this.activityStationService = activityStationService;
-        this.rechargeRightsService = rechargeRightsService;
-        this.userRechargeRightsService = userRechargeRightsService;
         this.bannerService = bannerService;
         this.couponService = couponService;
         this.redisTemplate = redisTemplate;
@@ -82,14 +71,6 @@ public class ActivityServiceImpl extends MyBaseServiceImpl<ActivityMapper, Activ
             activityStationService.saveBatch(activityStationList);
         }
 
-        // 新增充值优惠活动
-        if (activityVo.getDiscountType().equals(Activity.DISCOUNT_TYPE_服务费折扣权益) && !CommUtil.isEmptyOrNull(activityVo.getRechargeRightsList())) {
-            var rechargeRightsList = activityVo.getRechargeRightsList().stream().peek(rechargeRights -> {
-                BeanUtils.copyProperties(activity, rechargeRights, "id");
-                rechargeRights.setActivityId(activity.getId());
-            }).toList();
-            rechargeRightsService.saveBatch(rechargeRightsList);
-        }
 
         // 新增优惠券活动
         if (activityVo.getDiscountType().equals(Activity.DISCOUNT_TYPE_优惠券) && !CommUtil.isEmptyOrNull(activityVo.getCouponList())) {
@@ -136,16 +117,7 @@ public class ActivityServiceImpl extends MyBaseServiceImpl<ActivityMapper, Activ
         var activity = lambdaQuery().eq(Activity::getId, activityId).one();
         var activityVo = new ActivityVo();
         BeanUtils.copyProperties(activity, activityVo);
-        if (activity.getDiscountType().equals(DISCOUNT_TYPE_服务费折扣权益)) {
-            var rechargeRightsList = rechargeRightsService.lambdaQuery().eq(RechargeRights::getActivityId, activityId).list();
-            activityVo.setRechargeRightsList(rechargeRightsList);
-            var activityStationIds = activityStationService.lambdaQuery().eq(ActivityStation::getActivityId, activityId).list().stream().map(ActivityStation::getStationId).toList();
-            if (CommUtil.isNotEmptyAndNull(activityStationIds)) {
-                activityVo.setStationIds(activityStationIds);
-                //var stationList = stationService.lambdaQuery().in(Station::getStationId, activityStationIds).list();
-                //activityVo.setStationList(stationList);
-            }
-        } else if (activity.getDiscountType().equals(DISCOUNT_TYPE_优惠券)) {
+         if (activity.getDiscountType().equals(DISCOUNT_TYPE_优惠券)) {
             List<Coupon> couponList = couponService.lambdaQuery().eq(Coupon::getActivityId, activityId).list();
             activityVo.setCouponList(couponList);
             var activityStationIds = activityStationService.lambdaQuery().eq(ActivityStation::getActivityId, activityId).list().stream().map(ActivityStation::getStationId).toList();
@@ -169,12 +141,6 @@ public class ActivityServiceImpl extends MyBaseServiceImpl<ActivityMapper, Activ
         var activity = lambdaQuery().eq(Activity::getId, activityId).one();
         if (activity != null) {
             // 根据活动类型分别处理
-            if (activity.getDiscountType().equals(Activity.DISCOUNT_TYPE_服务费折扣权益)) {
-                lambdaUpdate().set(Activity::getStatus, Activity.STATUS_已结束).eq(Activity::getId, activityId).update();
-                rechargeRightsService.lambdaUpdate().set(RechargeRights::getStatus, Activity.STATUS_已结束).eq(RechargeRights::getActivityId, activityId).update();
-                // 修改banner状态为失效
-                bannerService.lambdaUpdate().set(Banner::getStatus, Banner.STATUS_有效).eq(Banner::getActivityId, activityId).update();
-            }
             if (activity.getDiscountType().equals(Activity.DISCOUNT_TYPE_优惠券)) {
                 var couponList = couponService.lambdaQuery().eq(Coupon::getActivityId, activityId).list();
                 // 优惠券状态修改为已结束
@@ -204,42 +170,4 @@ public class ActivityServiceImpl extends MyBaseServiceImpl<ActivityMapper, Activ
 
     }
 
-    /**
-     * 异步处理充值活动
-     *
-     * @param userId
-     * @param rechargeAmount
-     */
-    @Override
-    @Async
-    public void handleRechargeActivity(long userId, int rechargeAmount) {
-        asyncHandleRechargeActivity(userId, rechargeAmount);
-    }
-
-    /**
-     * 处理充值活动
-     */
-    @Transactional(rollbackFor = Exception.class)
-    public void asyncHandleRechargeActivity(long userId, int rechargeAmount) {
-        log.info("RechargeActivityTask run....");
-        // 进行中的充值权益活动
-        var activity = lambdaQuery().eq(Activity::getDiscountType, DISCOUNT_TYPE_服务费折扣权益).eq(Activity::getStatus, Activity.STATUS_进行中).one();
-        // 充值金额,匹配到到具体的充值权益,生成用户权益
-        if (activity != null) {
-            var rechargeRights = rechargeRightsService.lambdaQuery().eq(RechargeRights::getActivityId, activity.getId())
-                    .le(RechargeRights::getAmountMin, rechargeAmount)
-                    .gt(RechargeRights::getAmountMax, rechargeAmount)
-                    .one();
-            if (rechargeRights != null) {
-                var userRechargeRights = new UserRechargeRights().setRightsId(rechargeRights.getId()).setUserId(userId).setRightsBalance(rechargeAmount);
-                BeanUtils.copyProperties(rechargeRights, userRechargeRights, "id", "createTime", "updateTime");
-                // 计算有效期
-                var endTime = LocalDateTime.now().with(LocalTime.MAX).plusDays(rechargeRights.getValidity() - 1);
-                userRechargeRightsService.save(userRechargeRights.setStartTime(LocalDateTime.now()).setEndTime(endTime));
-            }
-        } else {
-        }
-        log.info("RechargeActivityTask run end....");
-    }
-
 }

+ 0 - 20
car-wash-service/src/main/java/com/kym/service/impl/OrderRechargeRightsServiceImpl.java

@@ -1,20 +0,0 @@
-package com.kym.service.impl;
-
-import com.github.yulichang.base.MPJBaseServiceImpl;
-import com.kym.entity.OrderRechargeRights;
-import com.kym.mapper.OrderRechargeRightsMapper;
-import com.kym.service.OrderRechargeRightsService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 订单充值权益表 服务实现类
- * </p>
- *
- * @author skyline
- * @since 2023-10-19
- */
-@Service
-public class OrderRechargeRightsServiceImpl extends MPJBaseServiceImpl<OrderRechargeRightsMapper, OrderRechargeRights> implements OrderRechargeRightsService {
-
-}

+ 0 - 60
car-wash-service/src/main/java/com/kym/service/impl/RechargeRightsServiceImpl.java

@@ -1,60 +0,0 @@
-package com.kym.service.impl;
-
-
-import com.github.pagehelper.PageHelper;
-import com.github.yulichang.base.MPJBaseServiceImpl;
-import com.github.yulichang.toolkit.JoinWrappers;
-import com.github.yulichang.wrapper.MPJLambdaWrapper;
-import com.kym.common.exception.BusinessException;
-import com.kym.common.utils.CommUtil;
-import com.kym.entity.ActivityStation;
-import com.kym.entity.Coupon;
-import com.kym.entity.RechargeRights;
-import com.kym.entity.queryParams.RightsQueryParam;
-import com.kym.entity.common.PageBean;
-import com.kym.entity.common.PageParams;
-import com.kym.mapper.RechargeRightsMapper;
-import com.kym.service.RechargeRightsService;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * <p>
- * 充值权益表 服务实现类
- * </p>
- *
- * @author skyline
- * @since 2023-10-18
- */
-@Service
-public class RechargeRightsServiceImpl extends MPJBaseServiceImpl<RechargeRightsMapper, RechargeRights> implements RechargeRightsService {
-
-    /**
-     * 所选站点可以参与的充值权益卡活动
-     *
-     * @param params
-     * @return
-     */
-    @Override
-    public PageBean<RechargeRights> listAvailableRechargeRights(RightsQueryParam params) {
-        if (CommUtil.isEmptyOrNull(params.getStationId())) {
-            throw new BusinessException("请选择充电站点");
-        }
-        PageHelper.startPage(params.getPageNum(), params.getPageSize());
-        MPJLambdaWrapper<RechargeRights> wrapper = JoinWrappers.lambda(RechargeRights.class)
-                .selectAll(RechargeRights.class)
-                .leftJoin(ActivityStation.class, ActivityStation::getActivityId, RechargeRights::getActivityId)
-                .eq(RechargeRights::getStatus, Coupon.STATUS_进行中)
-                .eq(ActivityStation::getStationId, params.getStationId());
-        List<RechargeRights> res = this.selectJoinList(RechargeRights.class, wrapper);
-        return new PageBean<>(res);
-    }
-
-    @Override
-    public PageBean<RechargeRights> listRechargeRight(PageParams pageParams, String activityId) {
-        PageHelper.startPage(pageParams.getPageNum(), pageParams.getPageSize());
-        var list = lambdaQuery().eq(!CommUtil.isEmptyOrNull(activityId), RechargeRights::getActivityId, activityId).orderByAsc(RechargeRights::getEndTime).list();
-        return new PageBean<>(list);
-    }
-}

+ 0 - 55
car-wash-service/src/main/java/com/kym/service/impl/UserRechargeRightsServiceImpl.java

@@ -1,55 +0,0 @@
-package com.kym.service.impl;
-
-import cn.dev33.satoken.stp.StpUtil;
-import com.github.yulichang.base.MPJBaseServiceImpl;
-import com.github.yulichang.toolkit.JoinWrappers;
-import com.github.yulichang.wrapper.MPJLambdaWrapper;
-import com.kym.entity.OrderRechargeRights;
-import com.kym.entity.UserRechargeRights;
-import com.kym.entity.vo.UserOrderRechargeRightsVo;
-import com.kym.mapper.UserRechargeRightsMapper;
-import com.kym.service.UserRechargeRightsService;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * <p>
- * 用户充值权益详情表 服务实现类
- * </p>
- *
- * @author skyline
- * @since 2023-10-18
- */
-@Service
-public class UserRechargeRightsServiceImpl extends MPJBaseServiceImpl<UserRechargeRightsMapper, UserRechargeRights> implements UserRechargeRightsService {
-
-
-    /**
-     * 通过订单号查询订单使用的权益卡信息
-     *
-     * @param startChargeSeq
-     * @return
-     */
-    @Override
-    public UserOrderRechargeRightsVo getUserOrderRechargeRights(String startChargeSeq) {
-        var userId = StpUtil.getLoginIdAsLong();
-        MPJLambdaWrapper<UserRechargeRights> wrapper = JoinWrappers.lambda(UserRechargeRights.class)
-                .selectAsClass(UserRechargeRights.class, UserOrderRechargeRightsVo.class)
-                .selectAs(OrderRechargeRights::getStartChargeSeq, UserOrderRechargeRightsVo::getStartChargeSeq)
-                .selectAs(OrderRechargeRights::getDiscountAmount, UserOrderRechargeRightsVo::getOrderDiscountAmount)
-                .rightJoin(OrderRechargeRights.class, on ->
-                        on.eq(OrderRechargeRights::getRightsId, UserRechargeRights::getRightsId).eq(OrderRechargeRights::getUserId, UserRechargeRights::getUserId))
-                .eq(OrderRechargeRights::getStartChargeSeq, startChargeSeq)
-                .eq(UserRechargeRights::getUserId, userId);
-        return  selectJoinOne(UserOrderRechargeRightsVo.class,wrapper);
-    }
-
-    @Override
-    public List<UserRechargeRights> listStationAvailableRights(Map<String, ?> params) {
-        return baseMapper.listStationAvailableRights(params);
-    }
-
-
-}

+ 0 - 2
car-wash-service/src/main/java/com/kym/service/wechat/WxPayService.java

@@ -6,9 +6,7 @@ import jakarta.servlet.http.HttpServletRequest;
 import lombok.SneakyThrows;
 import org.springframework.http.ResponseEntity;
 import org.springframework.transaction.annotation.Transactional;
-
 import java.io.IOException;
-import java.util.Map;
 
 /**
  * @author skyline

+ 4 - 23
car-wash-service/src/main/java/com/kym/service/wechat/impl/WxPayServiceImpl.java

@@ -84,14 +84,8 @@ public class WxPayServiceImpl implements WxPayService {
 
     private final RefundLogService refundLogService;
 
-    private final ActivityService activityService;
-
-    private final UserRechargeRightsService userRechargeRightsService;
-
     private final RechargeConfigService rechargeConfigService;
-    private final StationAccountService stationAccountService;
     private final SplitRecordService splitRecordService;
-    private final StationAccountRecordService stationAccountRecordService;
     private final WashOrderService washOrderService;
     private final MpMsgTemplateService mpMsgTemplateService;
     private final RechargePromotionService rechargePromotionService;
@@ -106,20 +100,17 @@ public class WxPayServiceImpl implements WxPayService {
     public WxPayServiceImpl(WxPayConfig conf, WalletDetailService walletDetailService,
                             PayLogService payLogService, AccountService accountService,
                             RefundLogService refundLogService,
-                            ActivityService activityService, UserRechargeRightsService userRechargeRightsService,
-                            RechargeConfigService rechargeConfigService, StationAccountService stationAccountService, SplitRecordService splitRecordService, StationAccountRecordService stationAccountRecordService, WashOrderService washOrderService, MpMsgTemplateService mpMsgTemplateService,
+                            ActivityService activityService,
+                            RechargeConfigService rechargeConfigService, SplitRecordService splitRecordService,
+                            WashOrderService washOrderService, MpMsgTemplateService mpMsgTemplateService,
                             RechargePromotionService rechargePromotionService) {
         this.conf = conf;
         this.walletDetailService = walletDetailService;
         this.payLogService = payLogService;
         this.accountService = accountService;
         this.refundLogService = refundLogService;
-        this.activityService = activityService;
-        this.userRechargeRightsService = userRechargeRightsService;
         this.rechargeConfigService = rechargeConfigService;
-        this.stationAccountService = stationAccountService;
         this.splitRecordService = splitRecordService;
-        this.stationAccountRecordService = stationAccountRecordService;
         this.washOrderService = washOrderService;
         this.mpMsgTemplateService = mpMsgTemplateService;
         this.rechargePromotionService = rechargePromotionService;
@@ -396,9 +387,6 @@ public class WxPayServiceImpl implements WxPayService {
                 walletDetail.setTransactionTime(successTime);
                 walletDetailService.updateById(walletDetail);
 
-                // 异步处理充值服务费打折权益活动相关逻辑
-                activityService.handleRechargeActivity(walletDetail.getUserId(), transaction.getAmount().getTotal());
-
                 // 支付记录
                 var payLog = new PayLog();
                 payLog.setUserId(walletDetail.getUserId());
@@ -525,13 +513,6 @@ public class WxPayServiceImpl implements WxPayService {
         // 将充值余额转移至冻结余额,同时清零充值余额和赠款余额
         accountService.lambdaUpdate().setSql(" frozen_amount = (frozen_amount + recharge_balance), balance = 0, recharge_balance = 0, grants_balance = 0").eq(Account::getUserId, userId).update();
 
-        // 退款时,充值权益失效(权益余额转入冻结余额,权益状态设置为失效)
-        userRechargeRightsService.lambdaUpdate()
-                .setSql("frozen_balance = (rights_balance + frozen_balance) , rights_balance = 0")
-                .set(UserRechargeRights::getStatus, UserRechargeRights.STATUS_无效)
-                .eq(UserRechargeRights::getUserId, userId)
-                .eq(UserRechargeRights::getStatus, UserRechargeRights.STATUS_有效)
-                .update();
 
         // 退款金额=充值余额(由于现在的资金消耗逻辑是先消耗充值余额再消耗赠款,所以不考虑优惠金额的影响)
         AtomicInteger refundAmount = new AtomicInteger(account.getRechargeBalance());
@@ -762,4 +743,4 @@ public class WxPayServiceImpl implements WxPayService {
     //================================================================发票=====================================================================
 
 
-}
+}