From b196114623ccdd63ee1cff8c768541f626a42d0a Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Mon, 6 May 2024 23:28:22 +0800 Subject: [PATCH] add withdraw freeze --- app/mix/controller/vas.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/mix/controller/vas.go b/app/mix/controller/vas.go index 92aafdd6..8a386546 100644 --- a/app/mix/controller/vas.go +++ b/app/mix/controller/vas.go @@ -232,9 +232,22 @@ func WithdrawPage(ctx *gin.Context) { ReplyOk(ctx, data) } +var WithdrawFreezeMidMap = map[int64]bool{ + 16311: true, + 159: true, +} + +func isWithdrawFreeze(mid int64) bool { + return WithdrawFreezeMidMap[mid] +} + // 提现发送验证码 func WithdrawSendVerifycode(ctx *gin.Context) { req := ctx.MustGet("client_req").(*vasproto.WithdrawSendVerifycodeReq) + if isWithdrawFreeze(req.Mid) { + ReplyErrorMsg(ctx, "当前提现功能已冻结") + return + } ec := service.DefaultService.WithdrawSendVerifycode(ctx, req) if ec != errcode.ErrCodeVasSrvOk { logger.Error("WithdrawSendVerifycode fail, req: %v, ec: %v", util.ToJson(req), ec) @@ -248,8 +261,11 @@ func WithdrawSendVerifycode(ctx *gin.Context) { func WithdrawApply(ctx *gin.Context) { //ReplyErrorMsg(ctx, "提现功能维护中,请72小时后再试") //return - req := ctx.MustGet("client_req").(*vasproto.WithdrawApplyReq) + if isWithdrawFreeze(req.Mid) { + ReplyErrorMsg(ctx, "当前提现功能已冻结") + return + } if req.Diamonds < 2000 { ReplyErrorMsg(ctx, "最低提现金额不能小于200元") return