- 调整所有Go文件中的import语句顺序,使其符合标准库、第三方库、内部库的分类- 统一import语句的格式,去除多余的空行 - 确保所有文件中的import语句按照字母顺序和逻辑分组排列-修复部分文件中import语句缺失或重复的问题 -优化import语句的可读性和维护性
65 lines
2.4 KiB
Go
65 lines
2.4 KiB
Go
package v1
|
|
|
|
import (
|
|
"kami/api/commonApi"
|
|
"kami/internal/consts"
|
|
"kami/internal/model/entity"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type SysPaymentGetReq struct {
|
|
g.Meta `path:"/sysUser/payment/list" tags:"用户充值" method:"get" summary:"用户充值列表"`
|
|
commonApi.CommonPageReq
|
|
}
|
|
|
|
type SysPaymentGetRes struct {
|
|
g.Meta `mime:"application/json"`
|
|
commonApi.CommonPageRes[*entity.V1SysUserPayment]
|
|
}
|
|
|
|
type SysPaymentGetOneReq struct {
|
|
g.Meta `path:"/sysUser/payment/get" tags:"用户充值" method:"get" summary:"用户钱包详情"`
|
|
UserId string `p:"userId" description:"用户ID"`
|
|
PaymentId int `p:"paymentId" description:"钱包ID"`
|
|
}
|
|
|
|
type SysPaymentGetOneRes struct {
|
|
g.Meta `mime:"application/json"`
|
|
*entity.V1SysUserPayment
|
|
}
|
|
|
|
// SysPaymentAddReq 充值或消费
|
|
type SysPaymentAddReq struct {
|
|
g.Meta `path:"/sysUser/payment/add" tags:"用户充值" method:"post" summary:"充值"`
|
|
UserId string `json:"userId" description:"用户ID" v:"required#用户Id不能为空"`
|
|
TransactionType consts.UserPaymentTransactionType `json:"transactionType" description:"交易类型" v:"required#交易类型不能为空"`
|
|
Amount decimal.Decimal `json:"amount" description:"充值金额" v:"required|min:0.001|max:99999999#充值金额不能为空|充值金额不能为0|充值金额不可大于99999999"`
|
|
Remark string `json:"remark" description:"备注"`
|
|
}
|
|
|
|
type SysPaymentAddRes struct{}
|
|
|
|
// SysPaymentRecordsGetReq 获取充值流水
|
|
type SysPaymentRecordsGetReq struct {
|
|
g.Meta `path:"/sysUser/paymentRecords/list" tags:"用户充值" method:"get" summary:"用户充值/消费流水"`
|
|
UserId string `p:"userId"`
|
|
TransactionType consts.UserPaymentTransactionType `p:"transactionType"`
|
|
commonApi.CommonPageReq
|
|
}
|
|
|
|
type SysPaymentRecordsGetRes struct {
|
|
g.Meta `mime:"application/json"`
|
|
commonApi.CommonPageRes[*entity.V1SysUserPaymentRecords]
|
|
}
|
|
|
|
// SysPaymentRecordsGetStatisticsReq 统计信息
|
|
type SysPaymentRecordsGetStatisticsReq struct {
|
|
g.Meta `path:"/sysUser/statistics" tags:"用户管理" method:"get" summary:"用户信息统计"`
|
|
}
|
|
type SysPaymentRecordsGetStatisticsRes struct {
|
|
Payment *entity.V1SysUserPayment `json:"payment"`
|
|
AppleAccountCount int `json:"appleAccountCount"`
|
|
}
|