重复注册token过期

This commit is contained in:
苏尹岚
2020-04-13 09:12:34 +08:00
parent 31aac2e7b1
commit 55ecbdc6c2
2 changed files with 7 additions and 2 deletions

View File

@@ -3044,7 +3044,7 @@ func DisabledStoreWithoutVendor(ctx *jxcontext.Context, isContinueWhenError, isA
db = dao.GetDB()
)
stores, err := dao.GetStoreList(db, nil, nil, []int{model.StoreStatusClosed, model.StoreStatusHaveRest, model.StoreStatusOpened}, nil, "")
task := tasksch.NewParallelTask("RefreshOrdersPriceInfo", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError), ctx,
task := tasksch.NewParallelTask("DisabledStoreWithoutVendor", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
store := batchItemList[0].(*model.Store)
storeMaps, err := dao.GetStoresMapList(db, []int{model.VendorIDYB, model.VendorIDJD, model.VendorIDJX, model.VendorIDEBAI, model.VendorIDMTWM}, []int{store.ID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "")

View File

@@ -179,7 +179,12 @@ func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVeri
return nil, err
}
if mobileAuth != nil && !mobileAuth.IsUserEmpty() {
return nil, jsonerr.New(mobileAuth, model.ErrCodeJsonUserAlreadyExist)
auth2.RemoveUserInfo(mobileAuth.Token)
if newAuthInfo, err := auth2.BindUser(mobileAuth, user); err == nil {
return nil, jsonerr.New(newAuthInfo, model.ErrCodeJsonUserAlreadyExist)
} else {
return nil, err
}
}
} else if inAuthInfo != nil {
user.Mobile = nil