This commit is contained in:
lwl0608 2024-01-07 23:02:25 +08:00
parent 9f2b80566e
commit 4c6125177b
2 changed files with 17 additions and 8 deletions

View File

@ -73,6 +73,10 @@ type OpSendReq struct {
Trigger string `json:"trigger"`
}
const (
VerifyCodeTriggerWithdraw = "withdraw"
)
type OpSendData struct {
Result bool
}

View File

@ -7,6 +7,7 @@ import (
"service/api/errcode"
"service/api/errs"
vasproto "service/api/proto/vas/proto"
vericodeproto "service/api/proto/vericode/proto"
"service/bizcommon/util"
"service/dbstruct"
"service/library/logger"
@ -386,14 +387,18 @@ func (s *Service) WithdrawSendVerifycode(ctx *gin.Context, req *vasproto.Withdra
// 获取验证码
bytes, _ := base64.StdEncoding.DecodeString(util.DerefString(acnt.MobilePhone))
bs, _ := mycrypto.CryptoServiceInstance().AES.Decrypt(bytes)
logger.Info("WithdrawSendVerifycode, phone: %v", string(bs))
//_DefaultVeriCode.OpSendVeriCode(ctx, &vericodeproto.OpSendReq{
// BaseRequest: req.BaseRequest,
// MobilePhone: "",
// RegionCode: "",
// Trigger: "",
//})
phoneBs, _ := mycrypto.CryptoServiceInstance().AES.Decrypt(bytes)
logger.Info("WithdrawSendVerifycode, mid: %v, phone: %v", req.Mid, string(phoneBs))
err := _DefaultVeriCode.OpSendVeriCode(ctx, &vericodeproto.OpSendReq{
BaseRequest: req.BaseRequest,
MobilePhone: string(phoneBs),
RegionCode: util.DerefString(acnt.RegionCode),
Trigger: vericodeproto.VerifyCodeTriggerWithdraw,
})
if err != nil {
logger.Error("OpSendVeriCode fail, req: %v, err: %v", util.ToJson(req), err)
return
}
return
}