- 新增可提现余额和不可提现余额字段,完善账户余额结构 - 添加充值接口支持微信和支付宝支付方式 - 实现token消费转换扣费功能,支持AI模型调用计费 - 增加管理员赠送金额接口,仅管理员可调用 - 完善交易记录查询功能,支持用户查看历史交易明细 - 集成模型价格服务,实现token费用自动计算 - 重构余额增加逻辑,区分可提现和不可提现金额 - 优化账户实体类初始化逻辑,确保余额字段正确设置 - 更新交易记录实体类,新增token相关和收支类型字段 - 修改支付配置,更新微信和支付宝回调地址为生产环境域名
93 lines
2.7 KiB
Java
93 lines
2.7 KiB
Java
package com.kexue.skills.entity;
|
||
|
||
import java.math.BigDecimal;
|
||
import java.util.Date;
|
||
|
||
import java.io.Serializable;
|
||
import com.kexue.skills.entity.base.BaseEntity;
|
||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||
import io.swagger.v3.oas.annotations.media.Schema;
|
||
import lombok.Data;
|
||
|
||
/**
|
||
* (PaymentOrder)实体类
|
||
* 支付订单表,记录用户的支付请求和支付结果
|
||
*
|
||
* @author 王志维
|
||
* @since 2025-02-21 23:01:48
|
||
*/
|
||
@Data
|
||
public class PaymentOrder extends BaseEntity implements Serializable {
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
@Schema(description ="主键ID")
|
||
private Long orderId;
|
||
|
||
@Schema(description ="订单号")
|
||
private String orderNo;
|
||
|
||
@Schema(description ="用户ID")
|
||
private Long userId;
|
||
|
||
@Schema(description ="用户名")
|
||
private String userName;
|
||
|
||
@Schema(description ="支付金额")
|
||
private BigDecimal amount;
|
||
|
||
@Schema(description ="支付方式:1.微信 2.支付宝")
|
||
private Integer payType;
|
||
|
||
@Schema(description ="支付状态:1.待支付 2.已支付 3.支付失败 4.已取消 5.已退款")
|
||
private Integer status;
|
||
|
||
@Schema(description ="支付渠道订单号")
|
||
private String channelOrderNo;
|
||
|
||
@Schema(description ="商品名称")
|
||
private String productName;
|
||
|
||
@Schema(description ="商品描述")
|
||
private String productDesc;
|
||
|
||
@Schema(description ="关联业务ID")
|
||
private Long businessId;
|
||
|
||
@Schema(description ="业务类型:recharge,purchase_content")
|
||
private String businessType;
|
||
|
||
@Schema(description ="支付回调地址")
|
||
private String notifyUrl;
|
||
|
||
@Schema(description ="支付成功跳转地址")
|
||
private String returnUrl;
|
||
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||
@Schema(description ="过期时间")
|
||
private Date expireTime;
|
||
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||
@Schema(description ="支付时间")
|
||
private Date payTime;
|
||
|
||
@Schema(description ="支付备注")
|
||
private String remark;
|
||
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||
@Schema(description ="创建时间")
|
||
private Date createTime;
|
||
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||
@Schema(description ="更新时间")
|
||
private Date updateTime;
|
||
|
||
@Schema(description ="是否删除 :0 未删除,1已删除")
|
||
private Integer deleteFlag;
|
||
|
||
@Schema(description ="创建人")
|
||
private String createBy;
|
||
|
||
@Schema(description ="更新人")
|
||
private String updateBy;
|
||
|
||
} |