All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m35s
新增功能: - 店铺佣金查询:店铺佣金统计、店铺佣金记录列表、店铺提现记录 - 佣金提现审批:提现申请列表、审批通过、审批拒绝 - 提现配置管理:配置列表、新增配置、获取当前生效配置 - 企业管理:企业列表、创建、更新、删除、获取详情 - 企业卡授权:授权列表、批量授权、批量取消授权、统计 - 客户账号管理:账号列表、创建、更新状态、重置密码 - 我的佣金:佣金统计、佣金记录、提现申请、提现记录 数据库变更: - 扩展 tb_commission_withdrawal_request 新增提现单号等字段 - 扩展 tb_account 新增 is_primary 字段 - 扩展 tb_commission_record 新增 shop_id、balance_after - 扩展 tb_commission_withdrawal_setting 新增每日提现次数限制 - 扩展 tb_iot_card、tb_device 新增 shop_id 冗余字段 - 新建 tb_enterprise_card_authorization 企业卡授权表 - 新建 tb_asset_allocation_record 资产分配记录表 - 数据迁移:owner_type 枚举值 agent 统一为 shop 测试: - 新增 7 个单元测试文件覆盖各服务 - 修复集成测试 Redis 依赖问题
73 lines
5.2 KiB
Go
73 lines
5.2 KiB
Go
package model
|
||
|
||
// WithdrawalRequestListReq 提现申请列表查询请求
|
||
type WithdrawalRequestListReq struct {
|
||
Page int `json:"page" query:"page" validate:"omitempty,min=1" minimum:"1" description:"页码(默认1)"`
|
||
PageSize int `json:"page_size" query:"page_size" validate:"omitempty,min=1,max=100" minimum:"1" maximum:"100" description:"每页数量(默认20,最大100)"`
|
||
Status *int `json:"status" query:"status" validate:"omitempty,min=1,max=4" minimum:"1" maximum:"4" description:"状态 (1:待审核, 2:已通过, 3:已拒绝, 4:已到账)"`
|
||
WithdrawalNo string `json:"withdrawal_no" query:"withdrawal_no" validate:"omitempty,max=50" maxLength:"50" description:"提现单号(精确查询)"`
|
||
ShopName string `json:"shop_name" query:"shop_name" validate:"omitempty,max=100" maxLength:"100" description:"店铺名称(模糊查询)"`
|
||
StartTime string `json:"start_time" query:"start_time" validate:"omitempty" description:"申请开始时间(格式:2006-01-02 15:04:05)"`
|
||
EndTime string `json:"end_time" query:"end_time" validate:"omitempty" description:"申请结束时间(格式:2006-01-02 15:04:05)"`
|
||
}
|
||
|
||
// WithdrawalRequestItem 提现申请列表项
|
||
type WithdrawalRequestItem struct {
|
||
ID uint `json:"id" description:"提现申请ID"`
|
||
WithdrawalNo string `json:"withdrawal_no" description:"提现单号"`
|
||
Amount int64 `json:"amount" description:"提现金额(分)"`
|
||
FeeRate int64 `json:"fee_rate" description:"手续费比率(基点,100=1%)"`
|
||
Fee int64 `json:"fee" description:"手续费(分)"`
|
||
ActualAmount int64 `json:"actual_amount" description:"实际到账金额(分)"`
|
||
Status int `json:"status" description:"状态 (1:待审核, 2:已通过, 3:已拒绝, 4:已到账)"`
|
||
StatusName string `json:"status_name" description:"状态名称"`
|
||
ShopID uint `json:"shop_id" description:"店铺ID"`
|
||
ShopName string `json:"shop_name" description:"店铺名称"`
|
||
ShopHierarchy string `json:"shop_hierarchy" description:"店铺层级路径"`
|
||
ApplicantID uint `json:"applicant_id" description:"申请人账号ID"`
|
||
ApplicantName string `json:"applicant_name" description:"申请人用户名"`
|
||
ProcessorID *uint `json:"processor_id,omitempty" description:"处理人账号ID"`
|
||
ProcessorName string `json:"processor_name,omitempty" description:"处理人用户名"`
|
||
WithdrawalMethod string `json:"withdrawal_method" description:"提现方式 (alipay:支付宝, wechat:微信, bank:银行卡)"`
|
||
PaymentType string `json:"payment_type" description:"放款类型 (manual:人工打款)"`
|
||
AccountName string `json:"account_name" description:"收款账户名称"`
|
||
AccountNumber string `json:"account_number" description:"收款账号"`
|
||
BankName string `json:"bank_name,omitempty" description:"银行名称"`
|
||
RejectReason string `json:"reject_reason,omitempty" description:"拒绝原因"`
|
||
Remark string `json:"remark,omitempty" description:"备注"`
|
||
CreatedAt string `json:"created_at" description:"申请时间"`
|
||
ProcessedAt string `json:"processed_at,omitempty" description:"处理时间"`
|
||
}
|
||
|
||
// WithdrawalRequestPageResult 提现申请列表分页响应
|
||
type WithdrawalRequestPageResult struct {
|
||
Items []WithdrawalRequestItem `json:"items" description:"提现申请列表"`
|
||
Total int64 `json:"total" description:"总记录数"`
|
||
Page int `json:"page" description:"当前页码"`
|
||
Size int `json:"size" description:"每页数量"`
|
||
}
|
||
|
||
// ApproveWithdrawalReq 审批通过提现申请请求
|
||
type ApproveWithdrawalReq struct {
|
||
PaymentType string `json:"payment_type" validate:"required,oneof=manual" required:"true" description:"放款类型(目前只支持manual人工打款)"`
|
||
Amount *int64 `json:"amount" validate:"omitempty,min=1" minimum:"1" description:"修正后的提现金额(分),不填则使用原金额"`
|
||
WithdrawalMethod *string `json:"withdrawal_method" validate:"omitempty,oneof=alipay wechat bank" description:"修正后的收款类型 (alipay:支付宝, wechat:微信, bank:银行卡)"`
|
||
AccountName *string `json:"account_name" validate:"omitempty,max=100" maxLength:"100" description:"修正后的收款人姓名"`
|
||
AccountNumber *string `json:"account_number" validate:"omitempty,max=100" maxLength:"100" description:"修正后的收款账号"`
|
||
Remark string `json:"remark" validate:"omitempty,max=500" maxLength:"500" description:"备注"`
|
||
}
|
||
|
||
// RejectWithdrawalReq 拒绝提现申请请求
|
||
type RejectWithdrawalReq struct {
|
||
Remark string `json:"remark" validate:"required,max=500" required:"true" maxLength:"500" description:"拒绝原因(必填)"`
|
||
}
|
||
|
||
// WithdrawalApprovalResp 审批响应
|
||
type WithdrawalApprovalResp struct {
|
||
ID uint `json:"id" description:"提现申请ID"`
|
||
WithdrawalNo string `json:"withdrawal_no" description:"提现单号"`
|
||
Status int `json:"status" description:"状态 (1:待审核, 2:已通过, 3:已拒绝, 4:已到账)"`
|
||
StatusName string `json:"status_name" description:"状态名称"`
|
||
ProcessedAt string `json:"processed_at" description:"处理时间"`
|
||
}
|