DELL 2 months ago
parent
commit
608dd26455
25 changed files with 5 additions and 993 deletions
  1. 1 1
      tuhuyangche/pom.xml
  2. 0 10
      tuhuyangche/src/main/java/com/zhentao/common/enums/CouponType.java
  3. 0 91
      tuhuyangche/src/main/java/com/zhentao/controller/CouponController.java
  4. 0 13
      tuhuyangche/src/main/java/com/zhentao/dto/CouponQueryDto.java
  5. 0 8
      tuhuyangche/src/main/java/com/zhentao/dto/UserCouponQueryDto.java
  6. 0 160
      tuhuyangche/src/main/java/com/zhentao/modules/domain/Coupon.java
  7. 0 125
      tuhuyangche/src/main/java/com/zhentao/modules/domain/PointsRule.java
  8. 0 133
      tuhuyangche/src/main/java/com/zhentao/modules/domain/UserCoupon.java
  9. 0 125
      tuhuyangche/src/main/java/com/zhentao/modules/domain/UserPointsRecord.java
  10. 0 18
      tuhuyangche/src/main/java/com/zhentao/modules/mapper/CouponMapper.java
  11. 0 18
      tuhuyangche/src/main/java/com/zhentao/modules/mapper/PointsRuleMapper.java
  12. 0 18
      tuhuyangche/src/main/java/com/zhentao/modules/mapper/UserCouponMapper.java
  13. 0 18
      tuhuyangche/src/main/java/com/zhentao/modules/mapper/UserPointsRecordMapper.java
  14. 0 25
      tuhuyangche/src/main/java/com/zhentao/modules/service/CouponService.java
  15. 0 13
      tuhuyangche/src/main/java/com/zhentao/modules/service/PointsRuleService.java
  16. 0 19
      tuhuyangche/src/main/java/com/zhentao/modules/service/UserCouponService.java
  17. 0 13
      tuhuyangche/src/main/java/com/zhentao/modules/service/UserPointsRecordService.java
  18. 0 66
      tuhuyangche/src/main/java/com/zhentao/modules/service/impl/CouponServiceImpl.java
  19. 0 22
      tuhuyangche/src/main/java/com/zhentao/modules/service/impl/PointsRuleServiceImpl.java
  20. 0 39
      tuhuyangche/src/main/java/com/zhentao/modules/service/impl/UserCouponServiceImpl.java
  21. 0 22
      tuhuyangche/src/main/java/com/zhentao/modules/service/impl/UserPointsRecordServiceImpl.java
  22. 0 14
      tuhuyangche/src/main/java/com/zhentao/vo/ResultVo.java
  23. 0 18
      tuhuyangche/src/main/java/com/zhentao/vo/UserCouponVo.java
  24. 2 2
      tuhuyangche/src/main/java/lsy/TuhuCarMaintenanceApplication.java
  25. 2 2
      tuhuyangche/src/main/resources/application.yml

+ 1 - 1
tuhuyangche/pom.xml

@@ -140,7 +140,7 @@
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <version>${spring-boot.version}</version>
                 <configuration>
-                    <mainClass>com.zhentao.TuhuCarMaintenanceApplication</mainClass>
+                    <mainClass>lsy.TuhuCarMaintenanceApplication</mainClass>
                     <skip>true</skip>
                 </configuration>
                 <executions>

+ 0 - 10
tuhuyangche/src/main/java/com/zhentao/common/enums/CouponType.java

@@ -1,10 +0,0 @@
-package com.zhentao.common.enums;
-
-/**
- * 优惠劵类型
- */
-public enum CouponType {
-    FULL_REDUCTION, // 满减券
-    DISCOUNT,       // 折扣券
-    NO_THRESHOLD    // 无门槛券
-}

+ 0 - 91
tuhuyangche/src/main/java/com/zhentao/controller/CouponController.java

@@ -1,91 +0,0 @@
-package com.zhentao.controller;
-
-import com.zhentao.dto.CouponQueryDto;
-import com.zhentao.modules.domain.Coupon;
-import com.zhentao.modules.domain.UserCoupon;
-import com.zhentao.modules.service.CouponService;
-import com.zhentao.modules.service.UserCouponService;
-import com.zhentao.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-@RestController
-@RequestMapping("/coupon")
-public class CouponController {
-
-    @Autowired
-    private CouponService couponService;
-    @Autowired
-    private UserCouponService userCouponService;
-
-
-    /**
-     * 查询所有优惠券
-     * @param couponQueryDto
-     * @return 优惠劵列表
-     */
-    @GetMapping("/list")
-    public ResultVo couponList(@RequestBody CouponQueryDto couponQueryDto) {
-        List<Coupon> list = couponService.couponList(couponQueryDto);
-        return new ResultVo(200, "操作成功", list);
-    }
-
-    /**
-     * 添加优惠券
-     * @param coupon
-     * @return
-     */
-    @PostMapping("/addCoupon")
-    public ResultVo addCoupon(@RequestBody Coupon coupon) {
-        boolean flag = couponService.addCoupon(coupon);
-        if (flag) {
-            return new ResultVo(200, "操作成功", null);
-        }
-        return new ResultVo(500, "操作失败", null);
-    }
-
-    /**
-     * 修改优惠券
-     * @param coupon
-     * @return
-     */
-    @PutMapping("/updateCoupon")
-    public ResultVo updateCoupon(@RequestBody Coupon coupon) {
-        boolean flag = couponService.updateCoupon(coupon);
-        if (flag) {
-            return new ResultVo(200, "操作成功", null);
-        }
-        return new ResultVo(500, "操作失败", null);
-    }
-
-    /**
-     * 删除优惠券
-     * @param id
-     * @return
-     */
-    @DeleteMapping("/deleteCoupon")
-    public ResultVo deleteCoupon(@RequestParam("id") Integer id) {
-        boolean flag = couponService.deleteCoupon(id);
-        if (flag) {
-            return new ResultVo(200, "操作成功", null);
-        }
-        return new ResultVo(500, "操作失败", null);
-    }
-
-    /**
-     * 查询优惠劵详情
-     * @param id
-     * @return 优惠劵信息
-     */
-    @GetMapping("/couponDetail")
-    public ResultVo couponDetail(@RequestParam("id") Integer id) {
-        Coupon coupon = couponService.couponDetail(id);
-        return new ResultVo(200, "操作成功", coupon);
-    }
-
-
-
-
-}

+ 0 - 13
tuhuyangche/src/main/java/com/zhentao/dto/CouponQueryDto.java

@@ -1,13 +0,0 @@
-package com.zhentao.dto;
-
-import com.zhentao.common.enums.CouponType;
-import lombok.Data;
-
-@Data
-public class CouponQueryDto {
-    private String couponName;
-    private CouponType couponType;
-    private Integer status;
-    private Integer size;
-    private Integer page;
-}

+ 0 - 8
tuhuyangche/src/main/java/com/zhentao/dto/UserCouponQueryDto.java

@@ -1,8 +0,0 @@
-package com.zhentao.dto;
-
-import lombok.Data;
-
-@Data
-public class UserCouponQueryDto {
-    private Integer couponType;
-}

+ 0 - 160
tuhuyangche/src/main/java/com/zhentao/modules/domain/Coupon.java

@@ -1,160 +0,0 @@
-package com.zhentao.modules.domain;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-import com.zhentao.common.enums.CouponType;
-import lombok.Data;
-
-/**
- * 优惠券表(优惠券模板)
- * @TableName coupon
- */
-@TableName(value ="coupon")
-@Data
-public class Coupon implements Serializable {
-    /**
-     * 优惠券ID(雪花ID)
-     */
-    @TableId
-    private Long id;
-
-    /**
-     * 优惠券名称(如“新用户满50减20”“老用户满100减30”)
-     */
-    private String couponName;
-
-    /**
-     * 优惠券类型(1:满减券,2:折扣券,3:无门槛券)
-     */
-    private CouponType couponType;
-
-    /**
-     * 面值(满减券:减多少元,折扣券:折扣率,如0.8代表8折)
-     */
-    private BigDecimal faceValue;
-
-    /**
-     * 使用门槛(满多少元可用,无门槛券填0)
-     */
-    private BigDecimal minAmount;
-
-    /**
-     * 发放对象(1:新用户,2:老用户,3:所有用户)
-     */
-    private Integer sendObject;
-
-    /**
-     * 总数量(发放总数)
-     */
-    private Integer totalCount;
-
-    /**
-     * 已使用数量
-     */
-    private Integer usedCount;
-
-    /**
-     * 生效时间
-     */
-    private Date startTime;
-
-    /**
-     * 失效时间
-     */
-    private Date endTime;
-
-    /**
-     * 状态(1:可领取,0:已下架)
-     */
-    private Integer status;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 更新时间
-     */
-    private Date updateTime;
-
-    @TableField(exist = false)
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public boolean equals(Object that) {
-        if (this == that) {
-            return true;
-        }
-        if (that == null) {
-            return false;
-        }
-        if (getClass() != that.getClass()) {
-            return false;
-        }
-        Coupon other = (Coupon) that;
-        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
-            && (this.getCouponName() == null ? other.getCouponName() == null : this.getCouponName().equals(other.getCouponName()))
-            && (this.getCouponType() == null ? other.getCouponType() == null : this.getCouponType().equals(other.getCouponType()))
-            && (this.getFaceValue() == null ? other.getFaceValue() == null : this.getFaceValue().equals(other.getFaceValue()))
-            && (this.getMinAmount() == null ? other.getMinAmount() == null : this.getMinAmount().equals(other.getMinAmount()))
-            && (this.getSendObject() == null ? other.getSendObject() == null : this.getSendObject().equals(other.getSendObject()))
-            && (this.getTotalCount() == null ? other.getTotalCount() == null : this.getTotalCount().equals(other.getTotalCount()))
-            && (this.getUsedCount() == null ? other.getUsedCount() == null : this.getUsedCount().equals(other.getUsedCount()))
-            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
-            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
-            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
-            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
-            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
-        result = prime * result + ((getCouponName() == null) ? 0 : getCouponName().hashCode());
-        result = prime * result + ((getCouponType() == null) ? 0 : getCouponType().hashCode());
-        result = prime * result + ((getFaceValue() == null) ? 0 : getFaceValue().hashCode());
-        result = prime * result + ((getMinAmount() == null) ? 0 : getMinAmount().hashCode());
-        result = prime * result + ((getSendObject() == null) ? 0 : getSendObject().hashCode());
-        result = prime * result + ((getTotalCount() == null) ? 0 : getTotalCount().hashCode());
-        result = prime * result + ((getUsedCount() == null) ? 0 : getUsedCount().hashCode());
-        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
-        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
-        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
-        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
-        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getClass().getSimpleName());
-        sb.append(" [");
-        sb.append("Hash = ").append(hashCode());
-        sb.append(", id=").append(id);
-        sb.append(", couponName=").append(couponName);
-        sb.append(", couponType=").append(couponType);
-        sb.append(", faceValue=").append(faceValue);
-        sb.append(", minAmount=").append(minAmount);
-        sb.append(", sendObject=").append(sendObject);
-        sb.append(", totalCount=").append(totalCount);
-        sb.append(", usedCount=").append(usedCount);
-        sb.append(", startTime=").append(startTime);
-        sb.append(", endTime=").append(endTime);
-        sb.append(", status=").append(status);
-        sb.append(", createTime=").append(createTime);
-        sb.append(", updateTime=").append(updateTime);
-        sb.append(", serialVersionUID=").append(serialVersionUID);
-        sb.append("]");
-        return sb.toString();
-    }
-}

+ 0 - 125
tuhuyangche/src/main/java/com/zhentao/modules/domain/PointsRule.java

@@ -1,125 +0,0 @@
-package com.zhentao.modules.domain;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-/**
- * 积分规则表(配置签到/消费得积分规则)
- * @TableName points_rule
- */
-@TableName(value ="points_rule")
-@Data
-public class PointsRule implements Serializable {
-    /**
-     * 规则ID(雪花ID)
-     */
-    @TableId
-    private Long id;
-
-    /**
-     * 规则名称(如“消费1元得1积分”“每日签到得5积分”)
-     */
-    private String ruleName;
-
-    /**
-     * 规则类型(1:积分获取,2:积分消耗)
-     */
-    private Integer ruleType;
-
-    /**
-     * 触发场景(CONSUME:消费,SIGN_IN:签到,TASK:任务)
-     */
-    private String triggerType;
-
-    /**
-     * 积分数量(如消费1元得1积分,则填1;签到得5积分填5)
-     */
-    private Integer pointsNum;
-
-    /**
-     * 触发条件(如“消费满10元生效”“每日仅1次签到”)
-     */
-    private String condition;
-
-    /**
-     * 规则状态(1:启用,0:禁用)
-     */
-    private Integer status;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 更新时间
-     */
-    private Date updateTime;
-
-    @TableField(exist = false)
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public boolean equals(Object that) {
-        if (this == that) {
-            return true;
-        }
-        if (that == null) {
-            return false;
-        }
-        if (getClass() != that.getClass()) {
-            return false;
-        }
-        PointsRule other = (PointsRule) that;
-        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
-            && (this.getRuleName() == null ? other.getRuleName() == null : this.getRuleName().equals(other.getRuleName()))
-            && (this.getRuleType() == null ? other.getRuleType() == null : this.getRuleType().equals(other.getRuleType()))
-            && (this.getTriggerType() == null ? other.getTriggerType() == null : this.getTriggerType().equals(other.getTriggerType()))
-            && (this.getPointsNum() == null ? other.getPointsNum() == null : this.getPointsNum().equals(other.getPointsNum()))
-            && (this.getCondition() == null ? other.getCondition() == null : this.getCondition().equals(other.getCondition()))
-            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
-            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
-            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
-        result = prime * result + ((getRuleName() == null) ? 0 : getRuleName().hashCode());
-        result = prime * result + ((getRuleType() == null) ? 0 : getRuleType().hashCode());
-        result = prime * result + ((getTriggerType() == null) ? 0 : getTriggerType().hashCode());
-        result = prime * result + ((getPointsNum() == null) ? 0 : getPointsNum().hashCode());
-        result = prime * result + ((getCondition() == null) ? 0 : getCondition().hashCode());
-        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
-        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
-        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getClass().getSimpleName());
-        sb.append(" [");
-        sb.append("Hash = ").append(hashCode());
-        sb.append(", id=").append(id);
-        sb.append(", ruleName=").append(ruleName);
-        sb.append(", ruleType=").append(ruleType);
-        sb.append(", triggerType=").append(triggerType);
-        sb.append(", pointsNum=").append(pointsNum);
-        sb.append(", condition=").append(condition);
-        sb.append(", status=").append(status);
-        sb.append(", createTime=").append(createTime);
-        sb.append(", updateTime=").append(updateTime);
-        sb.append(", serialVersionUID=").append(serialVersionUID);
-        sb.append("]");
-        return sb.toString();
-    }
-}

+ 0 - 133
tuhuyangche/src/main/java/com/zhentao/modules/domain/UserCoupon.java

@@ -1,133 +0,0 @@
-package com.zhentao.modules.domain;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-/**
- * 用户优惠券表(用户领取的优惠券)
- * @TableName user_coupon
- */
-@TableName(value ="user_coupon")
-@Data
-public class UserCoupon implements Serializable {
-    /**
-     * 用户优惠券ID(雪花ID)
-     */
-    @TableId
-    private Long id;
-
-    /**
-     * 关联用户ID(user.id)
-     */
-    private Long userId;
-
-    /**
-     * 关联优惠券ID(coupon.id)
-     */
-    private Long couponId;
-
-    /**
-     * 用户优惠券编号(唯一,用于核销)
-     */
-    private String couponNo;
-
-    /**
-     * 领取时间
-     */
-    private Date getTime;
-
-    /**
-     * 使用时间
-     */
-    private Date useTime;
-
-    /**
-     * 关联订单ID(使用时关联order_main.id)
-     */
-    private Long orderId;
-
-    /**
-     * 过期时间(与coupon.end_time一致)
-     */
-    private Date expireTime;
-
-    /**
-     * 状态(1:未使用,2:已使用,3:已过期)
-     */
-    private Integer couponStatus;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    @TableField(exist = false)
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public boolean equals(Object that) {
-        if (this == that) {
-            return true;
-        }
-        if (that == null) {
-            return false;
-        }
-        if (getClass() != that.getClass()) {
-            return false;
-        }
-        UserCoupon other = (UserCoupon) that;
-        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
-            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
-            && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
-            && (this.getCouponNo() == null ? other.getCouponNo() == null : this.getCouponNo().equals(other.getCouponNo()))
-            && (this.getGetTime() == null ? other.getGetTime() == null : this.getGetTime().equals(other.getGetTime()))
-            && (this.getUseTime() == null ? other.getUseTime() == null : this.getUseTime().equals(other.getUseTime()))
-            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
-            && (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
-            && (this.getCouponStatus() == null ? other.getCouponStatus() == null : this.getCouponStatus().equals(other.getCouponStatus()))
-            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
-        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
-        result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
-        result = prime * result + ((getCouponNo() == null) ? 0 : getCouponNo().hashCode());
-        result = prime * result + ((getGetTime() == null) ? 0 : getGetTime().hashCode());
-        result = prime * result + ((getUseTime() == null) ? 0 : getUseTime().hashCode());
-        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
-        result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
-        result = prime * result + ((getCouponStatus() == null) ? 0 : getCouponStatus().hashCode());
-        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getClass().getSimpleName());
-        sb.append(" [");
-        sb.append("Hash = ").append(hashCode());
-        sb.append(", id=").append(id);
-        sb.append(", userId=").append(userId);
-        sb.append(", couponId=").append(couponId);
-        sb.append(", couponNo=").append(couponNo);
-        sb.append(", getTime=").append(getTime);
-        sb.append(", useTime=").append(useTime);
-        sb.append(", orderId=").append(orderId);
-        sb.append(", expireTime=").append(expireTime);
-        sb.append(", couponStatus=").append(couponStatus);
-        sb.append(", createTime=").append(createTime);
-        sb.append(", serialVersionUID=").append(serialVersionUID);
-        sb.append("]");
-        return sb.toString();
-    }
-}

+ 0 - 125
tuhuyangche/src/main/java/com/zhentao/modules/domain/UserPointsRecord.java

@@ -1,125 +0,0 @@
-package com.zhentao.modules.domain;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-/**
- * 用户积分记录表(积分获取/消耗明细)
- * @TableName user_points_record
- */
-@TableName(value ="user_points_record")
-@Data
-public class UserPointsRecord implements Serializable {
-    /**
-     * 记录ID(雪花ID)
-     */
-    @TableId
-    private Long id;
-
-    /**
-     * 关联用户ID(user.id)
-     */
-    private Long userId;
-
-    /**
-     * 积分数量(正数:获取,负数:消耗)
-     */
-    private Integer pointsNum;
-
-    /**
-     * 记录后积分余额
-     */
-    private Integer pointsBalance;
-
-    /**
-     * 关联规则ID(points_rule.id,触发的规则)
-     */
-    private Long ruleId;
-
-    /**
-     * 关联业务ID(如订单ID/签到记录ID)
-     */
-    private Long relatedId;
-
-    /**
-     * 关联业务类型(ORDER:订单,SIGN_IN:签到)
-     */
-    private String relatedType;
-
-    /**
-     * 备注(如“2025-10-30签到得5积分”“订单12345消费得50积分”)
-     */
-    private String remark;
-
-    /**
-     * 记录时间
-     */
-    private Date createTime;
-
-    @TableField(exist = false)
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public boolean equals(Object that) {
-        if (this == that) {
-            return true;
-        }
-        if (that == null) {
-            return false;
-        }
-        if (getClass() != that.getClass()) {
-            return false;
-        }
-        UserPointsRecord other = (UserPointsRecord) that;
-        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
-            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
-            && (this.getPointsNum() == null ? other.getPointsNum() == null : this.getPointsNum().equals(other.getPointsNum()))
-            && (this.getPointsBalance() == null ? other.getPointsBalance() == null : this.getPointsBalance().equals(other.getPointsBalance()))
-            && (this.getRuleId() == null ? other.getRuleId() == null : this.getRuleId().equals(other.getRuleId()))
-            && (this.getRelatedId() == null ? other.getRelatedId() == null : this.getRelatedId().equals(other.getRelatedId()))
-            && (this.getRelatedType() == null ? other.getRelatedType() == null : this.getRelatedType().equals(other.getRelatedType()))
-            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
-            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
-        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
-        result = prime * result + ((getPointsNum() == null) ? 0 : getPointsNum().hashCode());
-        result = prime * result + ((getPointsBalance() == null) ? 0 : getPointsBalance().hashCode());
-        result = prime * result + ((getRuleId() == null) ? 0 : getRuleId().hashCode());
-        result = prime * result + ((getRelatedId() == null) ? 0 : getRelatedId().hashCode());
-        result = prime * result + ((getRelatedType() == null) ? 0 : getRelatedType().hashCode());
-        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
-        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getClass().getSimpleName());
-        sb.append(" [");
-        sb.append("Hash = ").append(hashCode());
-        sb.append(", id=").append(id);
-        sb.append(", userId=").append(userId);
-        sb.append(", pointsNum=").append(pointsNum);
-        sb.append(", pointsBalance=").append(pointsBalance);
-        sb.append(", ruleId=").append(ruleId);
-        sb.append(", relatedId=").append(relatedId);
-        sb.append(", relatedType=").append(relatedType);
-        sb.append(", remark=").append(remark);
-        sb.append(", createTime=").append(createTime);
-        sb.append(", serialVersionUID=").append(serialVersionUID);
-        sb.append("]");
-        return sb.toString();
-    }
-}

+ 0 - 18
tuhuyangche/src/main/java/com/zhentao/modules/mapper/CouponMapper.java

@@ -1,18 +0,0 @@
-package com.zhentao.modules.mapper;
-
-import com.zhentao.modules.domain.Coupon;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
-* @author 柳墨
-* @description 针对表【coupon(优惠券表(优惠券模板))】的数据库操作Mapper
-* @createDate 2025-11-02 15:43:51
-* @Entity com.zhentao.modules.domain.Coupon
-*/
-public interface CouponMapper extends BaseMapper<Coupon> {
-
-}
-
-
-
-

+ 0 - 18
tuhuyangche/src/main/java/com/zhentao/modules/mapper/PointsRuleMapper.java

@@ -1,18 +0,0 @@
-package com.zhentao.modules.mapper;
-
-import com.zhentao.modules.domain.PointsRule;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
-* @author 柳墨
-* @description 针对表【points_rule(积分规则表(配置签到/消费得积分规则))】的数据库操作Mapper
-* @createDate 2025-11-02 15:43:51
-* @Entity com.zhentao.modules.domain.PointsRule
-*/
-public interface PointsRuleMapper extends BaseMapper<PointsRule> {
-
-}
-
-
-
-

+ 0 - 18
tuhuyangche/src/main/java/com/zhentao/modules/mapper/UserCouponMapper.java

@@ -1,18 +0,0 @@
-package com.zhentao.modules.mapper;
-
-import com.zhentao.modules.domain.UserCoupon;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
-* @author 柳墨
-* @description 针对表【user_coupon(用户优惠券表(用户领取的优惠券))】的数据库操作Mapper
-* @createDate 2025-11-02 15:43:51
-* @Entity com.zhentao.modules.domain.UserCoupon
-*/
-public interface UserCouponMapper extends BaseMapper<UserCoupon> {
-
-}
-
-
-
-

+ 0 - 18
tuhuyangche/src/main/java/com/zhentao/modules/mapper/UserPointsRecordMapper.java

@@ -1,18 +0,0 @@
-package com.zhentao.modules.mapper;
-
-import com.zhentao.modules.domain.UserPointsRecord;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
-* @author 柳墨
-* @description 针对表【user_points_record(用户积分记录表(积分获取/消耗明细))】的数据库操作Mapper
-* @createDate 2025-11-02 15:43:51
-* @Entity com.zhentao.modules.domain.UserPointsRecord
-*/
-public interface UserPointsRecordMapper extends BaseMapper<UserPointsRecord> {
-
-}
-
-
-
-

+ 0 - 25
tuhuyangche/src/main/java/com/zhentao/modules/service/CouponService.java

@@ -1,25 +0,0 @@
-package com.zhentao.modules.service;
-
-import com.zhentao.dto.CouponQueryDto;
-import com.zhentao.modules.domain.Coupon;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-import java.util.List;
-
-/**
-* @author 柳墨
-* @description 针对表【coupon(优惠券表(优惠券模板))】的数据库操作Service
-* @createDate 2025-11-02 15:43:51
-*/
-public interface CouponService extends IService<Coupon> {
-
-    List<Coupon> couponList(CouponQueryDto couponQueryDto);
-
-    boolean addCoupon(Coupon coupon);
-
-    boolean updateCoupon(Coupon coupon);
-
-    boolean deleteCoupon(Integer id);
-
-    Coupon couponDetail(Integer id);
-}

+ 0 - 13
tuhuyangche/src/main/java/com/zhentao/modules/service/PointsRuleService.java

@@ -1,13 +0,0 @@
-package com.zhentao.modules.service;
-
-import com.zhentao.modules.domain.PointsRule;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-/**
-* @author 柳墨
-* @description 针对表【points_rule(积分规则表(配置签到/消费得积分规则))】的数据库操作Service
-* @createDate 2025-11-02 15:43:51
-*/
-public interface PointsRuleService extends IService<PointsRule> {
-
-}

+ 0 - 19
tuhuyangche/src/main/java/com/zhentao/modules/service/UserCouponService.java

@@ -1,19 +0,0 @@
-package com.zhentao.modules.service;
-
-import com.zhentao.modules.domain.Coupon;
-import com.zhentao.modules.domain.UserCoupon;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-import java.util.List;
-
-/**
-* @author 柳墨
-* @description 针对表【user_coupon(用户优惠券表(用户领取的优惠券))】的数据库操作Service
-* @createDate 2025-11-02 15:43:51
-*/
-public interface UserCouponService extends IService<UserCoupon> {
-
-    List<UserCoupon> userCouponList(Integer userId);
-
-    boolean useCoupon(Integer couponId, Integer userId);
-}

+ 0 - 13
tuhuyangche/src/main/java/com/zhentao/modules/service/UserPointsRecordService.java

@@ -1,13 +0,0 @@
-package com.zhentao.modules.service;
-
-import com.zhentao.modules.domain.UserPointsRecord;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-/**
-* @author 柳墨
-* @description 针对表【user_points_record(用户积分记录表(积分获取/消耗明细))】的数据库操作Service
-* @createDate 2025-11-02 15:43:51
-*/
-public interface UserPointsRecordService extends IService<UserPointsRecord> {
-
-}

+ 0 - 66
tuhuyangche/src/main/java/com/zhentao/modules/service/impl/CouponServiceImpl.java

@@ -1,66 +0,0 @@
-package com.zhentao.modules.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zhentao.dto.CouponQueryDto;
-import com.zhentao.modules.domain.Coupon;
-import com.zhentao.modules.service.CouponService;
-import com.zhentao.modules.mapper.CouponMapper;
-import org.springframework.stereotype.Service;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * @author 柳墨
- * @description 针对表【coupon(优惠券表(优惠券模板))】的数据库操作Service实现
- * @createDate 2025-11-02 15:43:51
- */
-@Service
-public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon>
-        implements CouponService {
-
-    @Override
-    public List<Coupon> couponList(CouponQueryDto dto) {
-        QueryWrapper<Coupon> queryWrapper = new QueryWrapper<>();
-
-        if (dto.getCouponName() != null && !dto.getCouponName().isEmpty()) {
-            queryWrapper.lambda().like(Coupon::getCouponName, dto.getCouponName());
-        }
-        if (dto.getCouponType() != null) {
-            queryWrapper.lambda().eq(Coupon::getCouponType, dto.getCouponType());
-        }
-        if (dto.getStatus() != null) {
-            queryWrapper.lambda().eq(Coupon::getStatus, dto.getStatus());
-        }
-
-        return this.list(queryWrapper);
-    }
-
-    @Override
-    public boolean addCoupon(Coupon coupon) {
-        coupon.setCreateTime(new Date());
-        coupon.setUpdateTime(new Date());
-        return this.save(coupon);
-    }
-
-    @Override
-    public boolean updateCoupon(Coupon coupon) {
-        coupon.setUpdateTime(new Date());
-        return this.updateById(coupon);
-    }
-
-    @Override
-    public boolean deleteCoupon(Integer id) {
-        return this.removeById(id);
-    }
-
-    @Override
-    public Coupon couponDetail(Integer id) {
-        return this.getById(id);
-    }
-}
-
-
-
-

+ 0 - 22
tuhuyangche/src/main/java/com/zhentao/modules/service/impl/PointsRuleServiceImpl.java

@@ -1,22 +0,0 @@
-package com.zhentao.modules.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zhentao.modules.domain.PointsRule;
-import com.zhentao.modules.service.PointsRuleService;
-import com.zhentao.modules.mapper.PointsRuleMapper;
-import org.springframework.stereotype.Service;
-
-/**
-* @author 柳墨
-* @description 针对表【points_rule(积分规则表(配置签到/消费得积分规则))】的数据库操作Service实现
-* @createDate 2025-11-02 15:43:51
-*/
-@Service
-public class PointsRuleServiceImpl extends ServiceImpl<PointsRuleMapper, PointsRule>
-    implements PointsRuleService{
-
-}
-
-
-
-

+ 0 - 39
tuhuyangche/src/main/java/com/zhentao/modules/service/impl/UserCouponServiceImpl.java

@@ -1,39 +0,0 @@
-package com.zhentao.modules.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zhentao.modules.domain.Coupon;
-import com.zhentao.modules.domain.UserCoupon;
-import com.zhentao.modules.service.UserCouponService;
-import com.zhentao.modules.mapper.UserCouponMapper;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * @author 柳墨
- * @description 针对表【user_coupon(用户优惠券表(用户领取的优惠券))】的数据库操作Service实现
- * @createDate 2025-11-02 15:43:51
- */
-@Service
-public class UserCouponServiceImpl extends ServiceImpl<UserCouponMapper, UserCoupon>
-        implements UserCouponService {
-
-    @Override
-    public List<UserCoupon> userCouponList(Integer userId) {
-        QueryWrapper<UserCoupon> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(UserCoupon::getUserId, userId);
-        return this.list(queryWrapper);
-    }
-
-    @Override
-    public boolean useCoupon(Integer couponId, Integer userId) {
-        return false;
-    }
-
-
-}
-
-
-
-

+ 0 - 22
tuhuyangche/src/main/java/com/zhentao/modules/service/impl/UserPointsRecordServiceImpl.java

@@ -1,22 +0,0 @@
-package com.zhentao.modules.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zhentao.modules.domain.UserPointsRecord;
-import com.zhentao.modules.service.UserPointsRecordService;
-import com.zhentao.modules.mapper.UserPointsRecordMapper;
-import org.springframework.stereotype.Service;
-
-/**
-* @author 柳墨
-* @description 针对表【user_points_record(用户积分记录表(积分获取/消耗明细))】的数据库操作Service实现
-* @createDate 2025-11-02 15:43:51
-*/
-@Service
-public class UserPointsRecordServiceImpl extends ServiceImpl<UserPointsRecordMapper, UserPointsRecord>
-    implements UserPointsRecordService{
-
-}
-
-
-
-

+ 0 - 14
tuhuyangche/src/main/java/com/zhentao/vo/ResultVo.java

@@ -1,14 +0,0 @@
-package com.zhentao.vo;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-public class ResultVo {
-    private Integer code;
-    private String message;
-    private Object data;
-}

+ 0 - 18
tuhuyangche/src/main/java/com/zhentao/vo/UserCouponVo.java

@@ -1,18 +0,0 @@
-package com.zhentao.vo;
-
-import lombok.Data;
-
-@Data
-public class UserCouponVo {
-    private Long userId;
-
-    /**
-     * 关联优惠券ID(coupon.id)
-     */
-    private Long couponId;
-
-    /**
-     * 用户优惠券编号(唯一,用于核销)
-     */
-    private String couponNo;
-}

+ 2 - 2
tuhuyangche/src/main/java/com/zhentao/TuhuCarMaintenanceApplication.java → tuhuyangche/src/main/java/lsy/TuhuCarMaintenanceApplication.java

@@ -1,11 +1,11 @@
-package com.zhentao;
+package lsy;
 
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 @SpringBootApplication
-@MapperScan(basePackages = "com.zhentao.modules.mapper")
+@MapperScan(basePackages = "lsy.mapper")
 public class TuhuCarMaintenanceApplication {
     public static void main(String[] args) {
         SpringApplication.run(TuhuCarMaintenanceApplication.class, args);

+ 2 - 2
tuhuyangche/src/main/resources/application.yml

@@ -2,8 +2,8 @@ server:
   port: 8666
 spring:
   datasource:
-    url: jdbc:mysql://120.26.175.13:3306/tuhuyangche?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowMultiQueries=true&tinyInt1isBit=false&allowLoadLocalInfile=true&allowLocalInfile=true&allowUrlInLocalInfile=true&allowPublicKeyRetrieval=true&allowMultiQueries=true&useInformationSchema=true&useUnicode=true&characterEncoding=utf-8&useSSL=
+    url: jdbc:mysql://120.26.175.13:3306/tuhuyangche?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowMultiQueries=true&tinyInt1isBit=false&allowLoadLocalInfile=true&allowLocalInfile=true&allowUrlInLocalInfile=true&allowPublicKeyRetrieval=true&allowMultiQueries=true&useInformationSchema=true&useUnicode=true&characterEncoding=utf-8&useSSL=true
     username: root
-    password: root
+    password: TUhuyangche!
     driver-class-name: com.mysql.cj.jdbc.Driver