修复提现拒绝审核参数校验
This commit is contained in:
@@ -87,7 +87,8 @@ func (r *Repository) Review(ctx context.Context, adminID, id uint64, req ReviewW
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
if req.Approved {
|
||||
approved := *req.Approved
|
||||
if approved {
|
||||
// 审核通过,进入处理中状态
|
||||
withdrawal.Status = "processing"
|
||||
} else {
|
||||
@@ -103,7 +104,7 @@ func (r *Repository) Review(ctx context.Context, adminID, id uint64, req ReviewW
|
||||
}
|
||||
|
||||
// 如果拒绝,解冻余额
|
||||
if !req.Approved {
|
||||
if !approved {
|
||||
if err := wallet.AppendEntries(tx, wallet.Entry{
|
||||
UserID: withdrawal.UserID,
|
||||
Direction: "out",
|
||||
|
||||
Reference in New Issue
Block a user