- 新增可提现余额和不可提现余额字段,完善账户余额结构 - 添加充值接口支持微信和支付宝支付方式 - 实现token消费转换扣费功能,支持AI模型调用计费 - 增加管理员赠送金额接口,仅管理员可调用 - 完善交易记录查询功能,支持用户查看历史交易明细 - 集成模型价格服务,实现token费用自动计算 - 重构余额增加逻辑,区分可提现和不可提现金额 - 优化账户实体类初始化逻辑,确保余额字段正确设置 - 更新交易记录实体类,新增token相关和收支类型字段 - 修改支付配置,更新微信和支付宝回调地址为生产环境域名
100 lines
2.9 KiB
Java
100 lines
2.9 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;
|
||
|
||
/**
|
||
* (AccountTransaction)实体类
|
||
* 账户流水表,记录用户的账户交易记录
|
||
*
|
||
* @author 王志维
|
||
* @since 2025-02-21 23:01:48
|
||
*/
|
||
@Data
|
||
public class AccountTransaction extends BaseEntity implements Serializable {
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
@Schema(description ="主键ID")
|
||
private Long transactionId;
|
||
|
||
@Schema(description ="用户ID")
|
||
private Long userId;
|
||
|
||
@Schema(description ="用户名")
|
||
private String userName;
|
||
|
||
@Schema(description ="交易类型:1.充值 2.提现 3.购买内容 4.退款 5.签到奖励 6.赠送 7.其他")
|
||
private Integer transactionType;
|
||
|
||
@Schema(description ="交易金额")
|
||
private BigDecimal amount;
|
||
|
||
@Schema(description ="交易前余额")
|
||
private BigDecimal beforeBalance;
|
||
|
||
@Schema(description ="交易后余额")
|
||
private BigDecimal afterBalance;
|
||
|
||
@Schema(description ="交易状态:1.成功 2.失败 3.处理中")
|
||
private Integer status;
|
||
|
||
@Schema(description ="交易单号")
|
||
private String transactionNo;
|
||
|
||
@Schema(description ="支付方式:1.微信 2.支付宝 3.余额支付")
|
||
private Integer payType;
|
||
|
||
@Schema(description ="关联业务ID")
|
||
private Long businessId;
|
||
|
||
@Schema(description ="业务类型")
|
||
private String businessType;
|
||
|
||
@Schema(description ="交易备注")
|
||
private String remark;
|
||
|
||
@Schema(description ="是否支出:1.是 0.否")
|
||
private Integer isExpense;
|
||
|
||
@Schema(description ="输入token")
|
||
private Integer inputToken;
|
||
|
||
@Schema(description ="输出token")
|
||
private Integer outputToken;
|
||
|
||
@Schema(description ="合计tokens")
|
||
private Integer totalTokens;
|
||
|
||
@Schema(description ="处理的模型名称")
|
||
private String modelName;
|
||
|
||
@Schema(description ="对应回答的问题或需求")
|
||
private String question;
|
||
|
||
@Schema(description ="收入类型:recharge(充值)、sign_in(签到奖励)")
|
||
private String incomeType;
|
||
|
||
@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 ="创建人")
|
||
private String createBy;
|
||
|
||
@Schema(description ="更新人")
|
||
private String updateBy;
|
||
|
||
@Schema(description ="是否删除 :0 未删除,1已删除")
|
||
private Integer deleteFlag;
|
||
|
||
} |