From cce6f9976cba7c9197bbb6720471e927435650a5 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Tue, 6 Aug 2024 11:31:35 +0800 Subject: [PATCH] add toast --- app/mix/controller/vas.go | 6 +++++- app/mix/service/logic/vas.go | 2 +- app/mix/service/vasservice.go | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/mix/controller/vas.go b/app/mix/controller/vas.go index 8357af6b..642bebaa 100644 --- a/app/mix/controller/vas.go +++ b/app/mix/controller/vas.go @@ -366,9 +366,13 @@ func WithdrawApply(ctx *gin.Context) { time.Sleep(time.Second * 1) - data, ec := service.DefaultService.WithdrawApply(ctx, req) + data, ec, err := service.DefaultService.WithdrawApply(ctx, req) if ec != errcode.ErrCodeVasSrvOk { logger.Error("WithdrawApply fail, req: %v, data: %v, ec: %v", util.ToJson(req), data, ec) + if err != nil { + ReplyErrorMsg(ctx, err.Error()) + return + } ReplyErrCodeMsg(ctx, ec) return } diff --git a/app/mix/service/logic/vas.go b/app/mix/service/logic/vas.go index 22312bcc..c1a901d8 100644 --- a/app/mix/service/logic/vas.go +++ b/app/mix/service/logic/vas.go @@ -2054,7 +2054,7 @@ func (v *Vas) WithdrawApply(ctx *gin.Context, req *vasproto.WithdrawApplyReq) (t } transferResp, err = alipayCli.UniTransfer(ctx, transferParam) if err != nil { - logger.Error("UniTransfer fail, param: %v, err: %v", util.ToJson(transferParam), err) + logger.Error("UniTransfer fail, param: %v, resp: %v, err: %v", util.ToJson(transferParam), util.ToJson(transferResp), err) return } if transferResp == nil { diff --git a/app/mix/service/vasservice.go b/app/mix/service/vasservice.go index 472a9a39..a0c51684 100644 --- a/app/mix/service/vasservice.go +++ b/app/mix/service/vasservice.go @@ -610,7 +610,7 @@ func (s *Service) WithdrawSendVerifycode(ctx *gin.Context, req *vasproto.Withdra } // 提现申请 -func (s *Service) WithdrawApply(ctx *gin.Context, req *vasproto.WithdrawApplyReq) (data *vasproto.WithdrawApplyData, ec errcode.ErrCode) { +func (s *Service) WithdrawApply(ctx *gin.Context, req *vasproto.WithdrawApplyReq) (data *vasproto.WithdrawApplyData, ec errcode.ErrCode, err error) { // 获取用户 acntMap, _ := _DefaultAccount.GetAccountMapByMids(ctx, []int64{req.Mid}) acnt, has := acntMap[req.Mid] @@ -631,7 +631,7 @@ func (s *Service) WithdrawApply(ctx *gin.Context, req *vasproto.WithdrawApplyReq } // 检验完删除 - err := _DefaultVeriCode.OpDelete(ctx, vCode.Id) + err = _DefaultVeriCode.OpDelete(ctx, vCode.Id) if err != nil { logger.Error("_DefaultVeriCode.OpDelete fail, req: %v, code: %v, err: %v", util.ToJson(req), util.ToJson(vCode), err) ec = errcode.ErrCodeVasInvalidVerifycode