重复解锁判断
This commit is contained in:
parent
6d4c1eb05a
commit
0352b0eb33
|
@ -83,7 +83,7 @@ func OneStepUnlock(ctx *gin.Context) {
|
|||
func ConsumerFillContact(ctx *gin.Context) {
|
||||
defer logger.Recover()
|
||||
req := ctx.MustGet("client_req").(*vasproto.ConsumerFillContactReq)
|
||||
if !req.IsValid() || len(req.OrderId) <= 0 {
|
||||
if req.Mid <= 0 || len(req.OrderId) <= 0 {
|
||||
logger.Error("ConsumerFillContact, invalid param, req: %v", util.ToJson(req))
|
||||
ReplyErrCodeMsg(ctx, errcode.ErrCodeBadParam)
|
||||
return
|
||||
|
|
|
@ -1420,6 +1420,14 @@ func (v *Vas) H5DirectUnlockWechat(ctx *gin.Context, req *vasproto.H5DirectUnloc
|
|||
var (
|
||||
uid = req.Uid
|
||||
)
|
||||
|
||||
// 是否重复解锁
|
||||
unlockInfo, _ := v.store.GetUserVasUnlock(ctx, nil, req.Mid, uid, dbstruct.ProductIdContactWechat)
|
||||
if unlockInfo != nil {
|
||||
err = errs.ErrVasAlreadyUnlock
|
||||
return
|
||||
}
|
||||
|
||||
// 获取主播信息
|
||||
uVas, _ := v.store.GetUserVasInfoByMid(ctx, uid)
|
||||
if uVas == nil {
|
||||
|
|
Loading…
Reference in New Issue