Ver código fonte

devfengjiajia

fengjiajia 1 semana atrás
pai
commit
81a43c83c7
30 arquivos alterados com 1002 adições e 0 exclusões
  1. 76 0
      src/main/java/com/zhentao/domain/Coupon.java
  2. 108 0
      src/main/java/com/zhentao/domain/OrderInfo.java
  3. 117 0
      src/main/java/com/zhentao/domain/OrderItem.java
  4. 92 0
      src/main/java/com/zhentao/domain/Sku.java
  5. 75 0
      src/main/java/com/zhentao/domain/UserCoupon.java
  6. 100 0
      src/main/java/com/zhentao/domain/UserLogin.java
  7. 18 0
      src/main/java/com/zhentao/mapper/CouponMapper.java
  8. 18 0
      src/main/java/com/zhentao/mapper/OrderInfoMapper.java
  9. 18 0
      src/main/java/com/zhentao/mapper/OrderItemMapper.java
  10. 18 0
      src/main/java/com/zhentao/mapper/SkuMapper.java
  11. 18 0
      src/main/java/com/zhentao/mapper/UserCouponMapper.java
  12. 18 0
      src/main/java/com/zhentao/mapper/UserLoginMapper.java
  13. 13 0
      src/main/java/com/zhentao/service/CouponService.java
  14. 13 0
      src/main/java/com/zhentao/service/OrderInfoService.java
  15. 13 0
      src/main/java/com/zhentao/service/OrderItemService.java
  16. 13 0
      src/main/java/com/zhentao/service/SkuService.java
  17. 13 0
      src/main/java/com/zhentao/service/UserCouponService.java
  18. 13 0
      src/main/java/com/zhentao/service/UserLoginService.java
  19. 22 0
      src/main/java/com/zhentao/service/impl/CouponServiceImpl.java
  20. 22 0
      src/main/java/com/zhentao/service/impl/OrderInfoServiceImpl.java
  21. 22 0
      src/main/java/com/zhentao/service/impl/OrderItemServiceImpl.java
  22. 22 0
      src/main/java/com/zhentao/service/impl/SkuServiceImpl.java
  23. 22 0
      src/main/java/com/zhentao/service/impl/UserCouponServiceImpl.java
  24. 22 0
      src/main/java/com/zhentao/service/impl/UserLoginServiceImpl.java
  25. 16 0
      src/main/resources/mapper/CouponMapper.xml
  26. 22 0
      src/main/resources/mapper/OrderInfoMapper.xml
  27. 23 0
      src/main/resources/mapper/OrderItemMapper.xml
  28. 19 0
      src/main/resources/mapper/SkuMapper.xml
  29. 16 0
      src/main/resources/mapper/UserCouponMapper.xml
  30. 20 0
      src/main/resources/mapper/UserLoginMapper.xml

+ 76 - 0
src/main/java/com/zhentao/domain/Coupon.java

@@ -0,0 +1,76 @@
+package com.zhentao.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 lombok.Data;
+
+/**
+ * 优惠券表
+ * @TableName coupon
+ */
+@TableName(value ="coupon")
+@Data
+public class Coupon implements Serializable {
+    /**
+     * 优惠券ID
+     */
+    private String couponId;
+
+    /**
+     * 用户ID(为空表示通用券)
+     */
+    private String userId;
+
+    /**
+     * 优惠金额
+     */
+    private BigDecimal discountAmount;
+
+    @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.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
+            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+            && (this.getDiscountAmount() == null ? other.getDiscountAmount() == null : this.getDiscountAmount().equals(other.getDiscountAmount()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
+        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+        result = prime * result + ((getDiscountAmount() == null) ? 0 : getDiscountAmount().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", couponId=").append(couponId);
+        sb.append(", userId=").append(userId);
+        sb.append(", discountAmount=").append(discountAmount);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 108 - 0
src/main/java/com/zhentao/domain/OrderInfo.java

@@ -0,0 +1,108 @@
+package com.zhentao.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 lombok.Data;
+
+/**
+ * 订单主表
+ * @TableName order_info
+ */
+@TableName(value ="order_info")
+@Data
+public class OrderInfo implements Serializable {
+    /**
+     * 订单ID
+     */
+    private String orderId;
+
+    /**
+     * 用户ID
+     */
+    private String userId;
+
+    /**
+     * 订单总金额
+     */
+    private BigDecimal totalAmount;
+
+    /**
+     * 优惠金额
+     */
+    private BigDecimal discountAmount;
+
+    /**
+     * 实付金额
+     */
+    private BigDecimal actualAmount;
+
+    /**
+     * 优惠券ID
+     */
+    private Long couponId;
+
+    /**
+     * 状态
+     */
+    private String status;
+
+    @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;
+        }
+        OrderInfo other = (OrderInfo) that;
+        return (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
+            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+            && (this.getTotalAmount() == null ? other.getTotalAmount() == null : this.getTotalAmount().equals(other.getTotalAmount()))
+            && (this.getDiscountAmount() == null ? other.getDiscountAmount() == null : this.getDiscountAmount().equals(other.getDiscountAmount()))
+            && (this.getActualAmount() == null ? other.getActualAmount() == null : this.getActualAmount().equals(other.getActualAmount()))
+            && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
+            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
+        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+        result = prime * result + ((getTotalAmount() == null) ? 0 : getTotalAmount().hashCode());
+        result = prime * result + ((getDiscountAmount() == null) ? 0 : getDiscountAmount().hashCode());
+        result = prime * result + ((getActualAmount() == null) ? 0 : getActualAmount().hashCode());
+        result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
+        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", orderId=").append(orderId);
+        sb.append(", userId=").append(userId);
+        sb.append(", totalAmount=").append(totalAmount);
+        sb.append(", discountAmount=").append(discountAmount);
+        sb.append(", actualAmount=").append(actualAmount);
+        sb.append(", couponId=").append(couponId);
+        sb.append(", status=").append(status);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 117 - 0
src/main/java/com/zhentao/domain/OrderItem.java

@@ -0,0 +1,117 @@
+package com.zhentao.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 lombok.Data;
+
+/**
+ * 订单明细表
+ * @TableName order_item
+ */
+@TableName(value ="order_item")
+@Data
+public class OrderItem implements Serializable {
+    /**
+     * 明细ID
+     */
+    private Long detailId;
+
+    /**
+     * 订单ID
+     */
+    private Long orderId;
+
+    /**
+     * 商品SKU ID
+     */
+    private Long skuId;
+
+    /**
+     * 商品名称
+     */
+    private String productName;
+
+    /**
+     * 单价
+     */
+    private BigDecimal unitPrice;
+
+    /**
+     * 数量
+     */
+    private Integer quantity;
+
+    /**
+     * 小计金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 创建时间
+     */
+    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;
+        }
+        OrderItem other = (OrderItem) that;
+        return (this.getDetailId() == null ? other.getDetailId() == null : this.getDetailId().equals(other.getDetailId()))
+            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
+            && (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId()))
+            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
+            && (this.getUnitPrice() == null ? other.getUnitPrice() == null : this.getUnitPrice().equals(other.getUnitPrice()))
+            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
+            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
+            && (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 + ((getDetailId() == null) ? 0 : getDetailId().hashCode());
+        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
+        result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode());
+        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
+        result = prime * result + ((getUnitPrice() == null) ? 0 : getUnitPrice().hashCode());
+        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
+        result = prime * result + ((getAmount() == null) ? 0 : getAmount().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(", detailId=").append(detailId);
+        sb.append(", orderId=").append(orderId);
+        sb.append(", skuId=").append(skuId);
+        sb.append(", productName=").append(productName);
+        sb.append(", unitPrice=").append(unitPrice);
+        sb.append(", quantity=").append(quantity);
+        sb.append(", amount=").append(amount);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 92 - 0
src/main/java/com/zhentao/domain/Sku.java

@@ -0,0 +1,92 @@
+package com.zhentao.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 lombok.Data;
+
+/**
+ * 商品SKU表
+ * @TableName sku
+ */
+@TableName(value ="sku")
+@Data
+public class Sku implements Serializable {
+    /**
+     * SKU ID
+     */
+    private Long skuId;
+
+    /**
+     * 商品ID
+     */
+    private Long productId;
+
+    /**
+     * 商品名称
+     */
+    private String productName;
+
+    /**
+     * 单价
+     */
+    private BigDecimal unitPrice;
+
+    /**
+     * 库存数量
+     */
+    private Integer stock;
+
+    @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;
+        }
+        Sku other = (Sku) that;
+        return (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId()))
+            && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
+            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
+            && (this.getUnitPrice() == null ? other.getUnitPrice() == null : this.getUnitPrice().equals(other.getUnitPrice()))
+            && (this.getStock() == null ? other.getStock() == null : this.getStock().equals(other.getStock()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode());
+        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
+        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
+        result = prime * result + ((getUnitPrice() == null) ? 0 : getUnitPrice().hashCode());
+        result = prime * result + ((getStock() == null) ? 0 : getStock().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", skuId=").append(skuId);
+        sb.append(", productId=").append(productId);
+        sb.append(", productName=").append(productName);
+        sb.append(", unitPrice=").append(unitPrice);
+        sb.append(", stock=").append(stock);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 75 - 0
src/main/java/com/zhentao/domain/UserCoupon.java

@@ -0,0 +1,75 @@
+package com.zhentao.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 lombok.Data;
+
+/**
+ * 
+ * @TableName user_coupon
+ */
+@TableName(value ="user_coupon")
+@Data
+public class UserCoupon implements Serializable {
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 用户id
+     */
+    private Integer userId;
+
+    /**
+     * 优惠券的id
+     */
+    private Long couponId;
+
+    @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()));
+    }
+
+    @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());
+        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(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 100 - 0
src/main/java/com/zhentao/domain/UserLogin.java

@@ -0,0 +1,100 @@
+package com.zhentao.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 lombok.Data;
+
+/**
+ * 
+ * @TableName user_login
+ */
+@TableName(value ="user_login")
+@Data
+public class UserLogin implements Serializable {
+    /**
+     * 用户id
+     */
+    @TableId
+    private Long id;
+
+    /**
+     * 
+     */
+    private Long openid;
+
+    /**
+     * 
+     */
+    private Long unionid;
+
+    /**
+     * 
+     */
+    private String sesseionkey;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+    @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;
+        }
+        UserLogin other = (UserLogin) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
+            && (this.getUnionid() == null ? other.getUnionid() == null : this.getUnionid().equals(other.getUnionid()))
+            && (this.getSesseionkey() == null ? other.getSesseionkey() == null : this.getSesseionkey().equals(other.getSesseionkey()))
+            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
+            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
+        result = prime * result + ((getUnionid() == null) ? 0 : getUnionid().hashCode());
+        result = prime * result + ((getSesseionkey() == null) ? 0 : getSesseionkey().hashCode());
+        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
+        result = prime * result + ((getPassword() == null) ? 0 : getPassword().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(", openid=").append(openid);
+        sb.append(", unionid=").append(unionid);
+        sb.append(", sesseionkey=").append(sesseionkey);
+        sb.append(", username=").append(username);
+        sb.append(", password=").append(password);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,18 @@
+package com.zhentao.mapper;
+
+import com.zhentao.domain.Coupon;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author lenovo
+* @description 针对表【coupon(优惠券表)】的数据库操作Mapper
+* @createDate 2025-05-10 10:00:46
+* @Entity com.zhentao.domain.Coupon
+*/
+public interface CouponMapper extends BaseMapper<Coupon> {
+
+}
+
+
+
+

+ 18 - 0
src/main/java/com/zhentao/mapper/OrderInfoMapper.java

@@ -0,0 +1,18 @@
+package com.zhentao.mapper;
+
+import com.zhentao.domain.OrderInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author lenovo
+* @description 针对表【order_info(订单主表)】的数据库操作Mapper
+* @createDate 2025-05-10 10:00:46
+* @Entity com.zhentao.domain.OrderInfo
+*/
+public interface OrderInfoMapper extends BaseMapper<OrderInfo> {
+
+}
+
+
+
+

+ 18 - 0
src/main/java/com/zhentao/mapper/OrderItemMapper.java

@@ -0,0 +1,18 @@
+package com.zhentao.mapper;
+
+import com.zhentao.domain.OrderItem;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author lenovo
+* @description 针对表【order_item(订单明细表)】的数据库操作Mapper
+* @createDate 2025-05-10 10:00:46
+* @Entity com.zhentao.domain.OrderItem
+*/
+public interface OrderItemMapper extends BaseMapper<OrderItem> {
+
+}
+
+
+
+

+ 18 - 0
src/main/java/com/zhentao/mapper/SkuMapper.java

@@ -0,0 +1,18 @@
+package com.zhentao.mapper;
+
+import com.zhentao.domain.Sku;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author lenovo
+* @description 针对表【sku(商品SKU表)】的数据库操作Mapper
+* @createDate 2025-05-10 10:00:46
+* @Entity com.zhentao.domain.Sku
+*/
+public interface SkuMapper extends BaseMapper<Sku> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.zhentao.mapper;
+
+import com.zhentao.domain.UserCoupon;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author lenovo
+* @description 针对表【user_coupon】的数据库操作Mapper
+* @createDate 2025-05-10 10:00:46
+* @Entity com.zhentao.domain.UserCoupon
+*/
+public interface UserCouponMapper extends BaseMapper<UserCoupon> {
+
+}
+
+
+
+

+ 18 - 0
src/main/java/com/zhentao/mapper/UserLoginMapper.java

@@ -0,0 +1,18 @@
+package com.zhentao.mapper;
+
+import com.zhentao.domain.UserLogin;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author lenovo
+* @description 针对表【user_login】的数据库操作Mapper
+* @createDate 2025-05-10 10:00:46
+* @Entity com.zhentao.domain.UserLogin
+*/
+public interface UserLoginMapper extends BaseMapper<UserLogin> {
+
+}
+
+
+
+

+ 13 - 0
src/main/java/com/zhentao/service/CouponService.java

@@ -0,0 +1,13 @@
+package com.zhentao.service;
+
+import com.zhentao.domain.Coupon;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author lenovo
+* @description 针对表【coupon(优惠券表)】的数据库操作Service
+* @createDate 2025-05-10 10:00:46
+*/
+public interface CouponService extends IService<Coupon> {
+
+}

+ 13 - 0
src/main/java/com/zhentao/service/OrderInfoService.java

@@ -0,0 +1,13 @@
+package com.zhentao.service;
+
+import com.zhentao.domain.OrderInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author lenovo
+* @description 针对表【order_info(订单主表)】的数据库操作Service
+* @createDate 2025-05-10 10:00:46
+*/
+public interface OrderInfoService extends IService<OrderInfo> {
+
+}

+ 13 - 0
src/main/java/com/zhentao/service/OrderItemService.java

@@ -0,0 +1,13 @@
+package com.zhentao.service;
+
+import com.zhentao.domain.OrderItem;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author lenovo
+* @description 针对表【order_item(订单明细表)】的数据库操作Service
+* @createDate 2025-05-10 10:00:46
+*/
+public interface OrderItemService extends IService<OrderItem> {
+
+}

+ 13 - 0
src/main/java/com/zhentao/service/SkuService.java

@@ -0,0 +1,13 @@
+package com.zhentao.service;
+
+import com.zhentao.domain.Sku;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author lenovo
+* @description 针对表【sku(商品SKU表)】的数据库操作Service
+* @createDate 2025-05-10 10:00:46
+*/
+public interface SkuService extends IService<Sku> {
+
+}

+ 13 - 0
src/main/java/com/zhentao/service/UserCouponService.java

@@ -0,0 +1,13 @@
+package com.zhentao.service;
+
+import com.zhentao.domain.UserCoupon;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author lenovo
+* @description 针对表【user_coupon】的数据库操作Service
+* @createDate 2025-05-10 10:00:46
+*/
+public interface UserCouponService extends IService<UserCoupon> {
+
+}

+ 13 - 0
src/main/java/com/zhentao/service/UserLoginService.java

@@ -0,0 +1,13 @@
+package com.zhentao.service;
+
+import com.zhentao.domain.UserLogin;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author lenovo
+* @description 针对表【user_login】的数据库操作Service
+* @createDate 2025-05-10 10:00:46
+*/
+public interface UserLoginService extends IService<UserLogin> {
+
+}

+ 22 - 0
src/main/java/com/zhentao/service/impl/CouponServiceImpl.java

@@ -0,0 +1,22 @@
+package com.zhentao.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.domain.Coupon;
+import com.zhentao.service.CouponService;
+import com.zhentao.mapper.CouponMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author lenovo
+* @description 针对表【coupon(优惠券表)】的数据库操作Service实现
+* @createDate 2025-05-10 10:00:46
+*/
+@Service
+public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon>
+    implements CouponService{
+
+}
+
+
+
+

+ 22 - 0
src/main/java/com/zhentao/service/impl/OrderInfoServiceImpl.java

@@ -0,0 +1,22 @@
+package com.zhentao.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.domain.OrderInfo;
+import com.zhentao.service.OrderInfoService;
+import com.zhentao.mapper.OrderInfoMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author lenovo
+* @description 针对表【order_info(订单主表)】的数据库操作Service实现
+* @createDate 2025-05-10 10:00:46
+*/
+@Service
+public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo>
+    implements OrderInfoService{
+
+}
+
+
+
+

+ 22 - 0
src/main/java/com/zhentao/service/impl/OrderItemServiceImpl.java

@@ -0,0 +1,22 @@
+package com.zhentao.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.domain.OrderItem;
+import com.zhentao.service.OrderItemService;
+import com.zhentao.mapper.OrderItemMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author lenovo
+* @description 针对表【order_item(订单明细表)】的数据库操作Service实现
+* @createDate 2025-05-10 10:00:46
+*/
+@Service
+public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem>
+    implements OrderItemService{
+
+}
+
+
+
+

+ 22 - 0
src/main/java/com/zhentao/service/impl/SkuServiceImpl.java

@@ -0,0 +1,22 @@
+package com.zhentao.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.domain.Sku;
+import com.zhentao.service.SkuService;
+import com.zhentao.mapper.SkuMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author lenovo
+* @description 针对表【sku(商品SKU表)】的数据库操作Service实现
+* @createDate 2025-05-10 10:00:46
+*/
+@Service
+public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku>
+    implements SkuService{
+
+}
+
+
+
+

+ 22 - 0
src/main/java/com/zhentao/service/impl/UserCouponServiceImpl.java

@@ -0,0 +1,22 @@
+package com.zhentao.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.domain.UserCoupon;
+import com.zhentao.service.UserCouponService;
+import com.zhentao.mapper.UserCouponMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author lenovo
+* @description 针对表【user_coupon】的数据库操作Service实现
+* @createDate 2025-05-10 10:00:46
+*/
+@Service
+public class UserCouponServiceImpl extends ServiceImpl<UserCouponMapper, UserCoupon>
+    implements UserCouponService{
+
+}
+
+
+
+

+ 22 - 0
src/main/java/com/zhentao/service/impl/UserLoginServiceImpl.java

@@ -0,0 +1,22 @@
+package com.zhentao.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.domain.UserLogin;
+import com.zhentao.service.UserLoginService;
+import com.zhentao.mapper.UserLoginMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author lenovo
+* @description 针对表【user_login】的数据库操作Service实现
+* @createDate 2025-05-10 10:00:46
+*/
+@Service
+public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin>
+    implements UserLoginService{
+
+}
+
+
+
+

+ 16 - 0
src/main/resources/mapper/CouponMapper.xml

@@ -0,0 +1,16 @@
+<?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.zhentao.mapper.CouponMapper">
+
+    <resultMap id="BaseResultMap" type="com.zhentao.domain.Coupon">
+            <result property="couponId" column="coupon_id" jdbcType="VARCHAR"/>
+            <result property="userId" column="user_id" jdbcType="VARCHAR"/>
+            <result property="discountAmount" column="discount_amount" jdbcType="DECIMAL"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        coupon_id,user_id,discount_amount
+    </sql>
+</mapper>

+ 22 - 0
src/main/resources/mapper/OrderInfoMapper.xml

@@ -0,0 +1,22 @@
+<?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.zhentao.mapper.OrderInfoMapper">
+
+    <resultMap id="BaseResultMap" type="com.zhentao.domain.OrderInfo">
+            <result property="orderId" column="order_id" jdbcType="VARCHAR"/>
+            <result property="userId" column="user_id" jdbcType="VARCHAR"/>
+            <result property="totalAmount" column="total_amount" jdbcType="DECIMAL"/>
+            <result property="discountAmount" column="discount_amount" jdbcType="DECIMAL"/>
+            <result property="actualAmount" column="actual_amount" jdbcType="DECIMAL"/>
+            <result property="couponId" column="coupon_id" jdbcType="BIGINT"/>
+            <result property="status" column="status" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        order_id,user_id,total_amount,
+        discount_amount,actual_amount,coupon_id,
+        status
+    </sql>
+</mapper>

+ 23 - 0
src/main/resources/mapper/OrderItemMapper.xml

@@ -0,0 +1,23 @@
+<?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.zhentao.mapper.OrderItemMapper">
+
+    <resultMap id="BaseResultMap" type="com.zhentao.domain.OrderItem">
+            <result property="detailId" column="detail_id" jdbcType="BIGINT"/>
+            <result property="orderId" column="order_id" jdbcType="BIGINT"/>
+            <result property="skuId" column="sku_id" jdbcType="BIGINT"/>
+            <result property="productName" column="product_name" jdbcType="VARCHAR"/>
+            <result property="unitPrice" column="unit_price" jdbcType="DECIMAL"/>
+            <result property="quantity" column="quantity" jdbcType="INTEGER"/>
+            <result property="amount" column="amount" jdbcType="DECIMAL"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        detail_id,order_id,sku_id,
+        product_name,unit_price,quantity,
+        amount,create_time
+    </sql>
+</mapper>

+ 19 - 0
src/main/resources/mapper/SkuMapper.xml

@@ -0,0 +1,19 @@
+<?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.zhentao.mapper.SkuMapper">
+
+    <resultMap id="BaseResultMap" type="com.zhentao.domain.Sku">
+            <result property="skuId" column="sku_id" jdbcType="BIGINT"/>
+            <result property="productId" column="product_id" jdbcType="BIGINT"/>
+            <result property="productName" column="product_name" jdbcType="VARCHAR"/>
+            <result property="unitPrice" column="unit_price" jdbcType="DECIMAL"/>
+            <result property="stock" column="stock" jdbcType="INTEGER"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        sku_id,product_id,product_name,
+        unit_price,stock
+    </sql>
+</mapper>

+ 16 - 0
src/main/resources/mapper/UserCouponMapper.xml

@@ -0,0 +1,16 @@
+<?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.zhentao.mapper.UserCouponMapper">
+
+    <resultMap id="BaseResultMap" type="com.zhentao.domain.UserCoupon">
+            <result property="id" column="id" jdbcType="BIGINT"/>
+            <result property="userId" column="user_id" jdbcType="INTEGER"/>
+            <result property="couponId" column="coupon_id" jdbcType="BIGINT"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,user_id,coupon_id
+    </sql>
+</mapper>

+ 20 - 0
src/main/resources/mapper/UserLoginMapper.xml

@@ -0,0 +1,20 @@
+<?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.zhentao.mapper.UserLoginMapper">
+
+    <resultMap id="BaseResultMap" type="com.zhentao.domain.UserLogin">
+            <id property="id" column="id" jdbcType="BIGINT"/>
+            <result property="openid" column="openid" jdbcType="BIGINT"/>
+            <result property="unionid" column="unionid" jdbcType="BIGINT"/>
+            <result property="sesseionkey" column="sesseionkey" jdbcType="VARCHAR"/>
+            <result property="username" column="username" jdbcType="VARCHAR"/>
+            <result property="password" column="password" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,openid,unionid,
+        sesseionkey,username,password
+    </sql>
+</mapper>