Files
MTKJPAY/mt-pay/src/main/java/com/mtkj/mtpay/entity/CustomerOrder.java
qiube a38af35ac5 feat(payment): 优化支付请求参数处理与商品列表接口
- 移除CheckoutRequestDTO中accId和sign字段的必填校验
- 支持从配置文件自动填充accId和signType字段
- 签名sign字段改为后端自动生成
- 新增商品列表查询接口GET /products/list
- 实现listProducts服务方法,支持分页和状态过滤
- 添加详细的日志记录和异常处理
- 修复启动时devtools导致的静默退出问题
- 优化数字类型参数转换异常处理
2025-12-22 15:21:27 +08:00

173 lines
4.5 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}