- 移除CheckoutRequestDTO中accId和sign字段的必填校验 - 支持从配置文件自动填充accId和signType字段 - 签名sign字段改为后端自动生成 - 新增商品列表查询接口GET /products/list - 实现listProducts服务方法,支持分页和状态过滤 - 添加详细的日志记录和异常处理 - 修复启动时devtools导致的静默退出问题 - 优化数字类型参数转换异常处理
173 lines
4.5 KiB
Java
173 lines
4.5 KiB
Java
package com.mtkj.mtpay.entity;
|
||
|
||
import com.baomidou.mybatisplus.annotation.*;
|
||
import lombok.Data;
|
||
|
||
import java.math.BigDecimal;
|
||
import java.time.LocalDateTime;
|
||
|
||
/**
|
||
* 客户订单实体类
|
||
*/
|
||
@TableName(value = "customer_order")
|
||
@Data
|
||
public class CustomerOrder {
|
||
|
||
/**
|
||
* 主键ID
|
||
*/
|
||
@TableId(value = "id", type = IdType.AUTO)
|
||
private Long id;
|
||
|
||
/**
|
||
* 订单号(全局唯一)
|
||
*/
|
||
@TableField(value = "order_no", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String orderNo;
|
||
|
||
/**
|
||
* 商品ID
|
||
*/
|
||
@TableField(value = "product_id", jdbcType = org.apache.ibatis.type.JdbcType.BIGINT)
|
||
private Long productId;
|
||
|
||
/**
|
||
* 商品名称
|
||
*/
|
||
@TableField(value = "product_name", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String productName;
|
||
|
||
/**
|
||
* SKU ID
|
||
*/
|
||
@TableField(value = "sku_id", jdbcType = org.apache.ibatis.type.JdbcType.BIGINT)
|
||
private Long skuId;
|
||
|
||
/**
|
||
* SKU名称/描述
|
||
*/
|
||
@TableField(value = "sku_name", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String skuName;
|
||
|
||
/**
|
||
* 购买数量
|
||
*/
|
||
@TableField(value = "quantity", jdbcType = org.apache.ibatis.type.JdbcType.INTEGER)
|
||
private Integer quantity;
|
||
|
||
/**
|
||
* 单价
|
||
*/
|
||
@TableField(value = "unit_price", jdbcType = org.apache.ibatis.type.JdbcType.DECIMAL)
|
||
private BigDecimal unitPrice;
|
||
|
||
/**
|
||
* 订单总金额
|
||
*/
|
||
@TableField(value = "total_amount", jdbcType = org.apache.ibatis.type.JdbcType.DECIMAL)
|
||
private BigDecimal totalAmount;
|
||
|
||
/**
|
||
* 货币代码
|
||
*/
|
||
@TableField(value = "currency", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String currency;
|
||
|
||
/**
|
||
* 订单状态:PENDING-待支付,PAID-已支付,SHIPPED-已发货,COMPLETED-已完成,CANCELLED-已取消
|
||
*/
|
||
@TableField(value = "status", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String status;
|
||
|
||
/**
|
||
* 客户姓名
|
||
*/
|
||
@TableField(value = "customer_name", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String customerName;
|
||
|
||
/**
|
||
* 客户电话
|
||
*/
|
||
@TableField(value = "customer_phone", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String customerPhone;
|
||
|
||
/**
|
||
* 客户邮箱
|
||
*/
|
||
@TableField(value = "customer_email", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String customerEmail;
|
||
|
||
/**
|
||
* 收货人姓名
|
||
*/
|
||
@TableField(value = "shipping_name", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String shippingName;
|
||
|
||
/**
|
||
* 收货人电话
|
||
*/
|
||
@TableField(value = "shipping_phone", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String shippingPhone;
|
||
|
||
/**
|
||
* 收货国家
|
||
*/
|
||
@TableField(value = "shipping_country", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String shippingCountry;
|
||
|
||
/**
|
||
* 收货州/省
|
||
*/
|
||
@TableField(value = "shipping_state", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String shippingState;
|
||
|
||
/**
|
||
* 收货城市
|
||
*/
|
||
@TableField(value = "shipping_city", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String shippingCity;
|
||
|
||
/**
|
||
* 收货街道地址
|
||
*/
|
||
@TableField(value = "shipping_street", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String shippingStreet;
|
||
|
||
/**
|
||
* 收货邮编
|
||
*/
|
||
@TableField(value = "shipping_postcode", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String shippingPostcode;
|
||
|
||
/**
|
||
* 关联的支付订单ID
|
||
*/
|
||
@TableField(value = "payment_order_id", jdbcType = org.apache.ibatis.type.JdbcType.BIGINT)
|
||
private Long paymentOrderId;
|
||
|
||
/**
|
||
* 支付状态:UNPAID-未支付,PAID-已支付,FAILED-支付失败
|
||
*/
|
||
@TableField(value = "payment_status", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String paymentStatus;
|
||
|
||
/**
|
||
* 订单备注
|
||
*/
|
||
@TableField(value = "remark", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||
private String remark;
|
||
|
||
/**
|
||
* 创建时间
|
||
*/
|
||
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||
private LocalDateTime createTime;
|
||
|
||
/**
|
||
* 更新时间
|
||
*/
|
||
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
|
||
private LocalDateTime updateTime;
|
||
}
|
||
|