This commit is contained in:
liangzai 2025-05-06 22:34:31 +08:00
parent 20c96d1a40
commit d4f6b3a030

View File

@ -74,8 +74,7 @@ func (l *AgentWithdrawalLogic) AgentWithdrawal(req *types.WithdrawalReq) (*types
} }
// 校验可提现金额 // 校验可提现金额
withdrawableAmount := agentWallet.Balance - agentWallet.FrozenBalance if req.Amount > agentWallet.Balance {
if req.Amount > withdrawableAmount {
return errors.Wrapf(xerr.NewErrMsg("您可提现的余额不足"), "获取用户ID失败") return errors.Wrapf(xerr.NewErrMsg("您可提现的余额不足"), "获取用户ID失败")
} }