新功能(#41): 提现优化 — 收款方式选择 + 取消提现 + 收款码上传
Build docker and publish / build (20.15.1) (push) Failing after 8m37s
Build docker and publish / build (20.15.1) (push) Failing after 8m37s
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -37,9 +37,9 @@ func approveWithdrawal(ctx context.Context, svcCtx *svc.ServiceContext, withdraw
|
||||
}
|
||||
|
||||
if err := tx.Model(&usermodel.Withdrawal{}).
|
||||
Where("id = ? AND status = 0", withdrawalID).
|
||||
Where("id = ? AND status = ?", withdrawalID, usermodel.WithdrawalStatusPending).
|
||||
Updates(map[string]interface{}{
|
||||
"status": 1,
|
||||
"status": usermodel.WithdrawalStatusApproved,
|
||||
"reason": "",
|
||||
}).Error; err != nil {
|
||||
return errors.Wrapf(xerr.NewErrCode(xerr.DatabaseUpdateError), "approve withdrawal failed: %v", err)
|
||||
@@ -80,9 +80,9 @@ func rejectWithdrawal(ctx context.Context, svcCtx *svc.ServiceContext, withdrawa
|
||||
// Commission was NOT deducted at application time under the new logic,
|
||||
// so rejection requires no refund — only a status update.
|
||||
return tx.Model(&usermodel.Withdrawal{}).
|
||||
Where("id = ? AND status = 0", withdrawalID).
|
||||
Where("id = ? AND status = ?", withdrawalID, usermodel.WithdrawalStatusPending).
|
||||
Updates(map[string]interface{}{
|
||||
"status": 2,
|
||||
"status": usermodel.WithdrawalStatusRejected,
|
||||
"reason": reason,
|
||||
}).Error
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user