清token退回

This commit is contained in:
苏尹岚
2020-04-13 10:05:51 +08:00
parent e4b11a73cb
commit 81d63e1741
2 changed files with 10 additions and 7 deletions

View File

@@ -1720,6 +1720,7 @@ func SendNoCatSkusToOperater(ctx *jxcontext.Context) (err error) {
db = dao.GetDB()
skuNames []*model.SkuName
)
globals.SugarLogger.Debugf("SendNoCatSkusToOperater")
sql := `
SELECT * FROM sku_name WHERE deleted_at = ? AND (category_id = ? OR img = ?) AND unit <> ?
`

View File

@@ -179,13 +179,15 @@ func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVeri
return nil, err
}
if mobileAuth != nil && !mobileAuth.IsUserEmpty() {
auth2.RemoveUserInfo(mobileAuth.Token)
if newAuthInfo, err := auth2.BindUser(mobileAuth, user); err == nil {
globals.SugarLogger.Debugf("testRegisterUserWithMobile", utils.Format4Output(mobileAuth, false), utils.Format4Output(newAuthInfo, false))
return nil, jsonerr.New(newAuthInfo, model.ErrCodeJsonUserAlreadyExist)
} else {
return nil, err
}
return nil, jsonerr.New(mobileAuth, model.ErrCodeJsonUserAlreadyExist)
// auth2.RemoveUserInfo(mobileAuth.Token)
// if newAuthInfo, err := auth2.BindUser(mobileAuth, user); err == nil {
// globals.SugarLogger.Debugf("testRegisterUserWithMobile", utils.Format4Output(mobileAuth, false), utils.Format4Output(newAuthInfo, false))
// return nil, jsonerr.New(newAuthInfo, model.ErrCodeJsonUserAlreadyExist)
// } else {
// return nil, err
// }
}
} else if inAuthInfo != nil {
user.Mobile = nil