feat: 提现优化 — 取消状态 + 收款方式 + TableName 修复 (HIF-42)
- P04: 修复 Withdrawal.TableName() 返回正确表名 withdrawals
- P03: 新增提现状态常量 (constant/withdrawal.go),消除魔法数字 0/1/2/3;
新增 CommissionTypeWithdrawCancel (338) 和 WithdrawalCancelForbidden 错误码
- P02: 迁移 02123 为 withdrawals 表添加 method/account/qr_code_url 列;
扩展 Withdrawal GORM 模型和 API 类型(CommissionWithdrawRequest、WithdrawalLog);
申请提现时增加收款方式校验逻辑
- P01: 新增用户取消提现接口 POST /v1/public/user/withdrawal_cancel;
仅可取消自己的待审核提现,退还佣金并写佣金日志
- P05: 管理端提现列表新增 method 过滤参数
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
+13
-2
@@ -289,8 +289,11 @@ type CommissionLog struct {
|
||||
}
|
||||
|
||||
type CommissionWithdrawRequest struct {
|
||||
Amount int64 `json:"amount"`
|
||||
Content string `json:"content"`
|
||||
Amount int64 `json:"amount"`
|
||||
Method uint8 `json:"method"`
|
||||
Account string `json:"account"`
|
||||
QrCodeUrl string `json:"qr_code_url"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
type ConnectionRecords struct {
|
||||
@@ -2284,11 +2287,16 @@ type QueryWithdrawalLogListResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type CancelWithdrawalRequest struct {
|
||||
WithdrawalId int64 `json:"withdrawal_id" validate:"required,gt=0"`
|
||||
}
|
||||
|
||||
type GetWithdrawalListRequest struct {
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
UserId *int64 `form:"user_id,omitempty"`
|
||||
Status *uint8 `form:"status,omitempty"`
|
||||
Method *uint8 `form:"method,omitempty"`
|
||||
}
|
||||
|
||||
type GetWithdrawalListResponse struct {
|
||||
@@ -3604,6 +3612,9 @@ type WithdrawalLog struct {
|
||||
Id int64 `json:"id"`
|
||||
UserId int64 `json:"user_id"`
|
||||
Amount int64 `json:"amount"`
|
||||
Method uint8 `json:"method"`
|
||||
Account string `json:"account"`
|
||||
QrCodeUrl string `json:"qr_code_url"`
|
||||
Content string `json:"content"`
|
||||
Status uint8 `json:"status"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user