- 老TOKEN调用user2/GetMyStoreList时,返回TOKEN无效或过期错,要求重新登录
This commit is contained in:
@@ -207,12 +207,16 @@ func GetStoreList4User(ctx *jxcontext.Context, mobileNum, userID string) (storeL
|
||||
return storeList, err
|
||||
}
|
||||
|
||||
func GetMyStoreListNew(ctx *jxcontext.Context) (storeList []*dao.StoreWithCityName, err error) {
|
||||
func GetMyStoreListNew(ctx *jxcontext.Context) (storeList []*dao.StoreWithCityName, errCode string, err error) {
|
||||
if !auth2.IsV2Token(ctx.GetToken()) {
|
||||
return nil, model.ErrCodeTokenIsInvalid, model.ErrTokenIsInvalid
|
||||
}
|
||||
mobileNum, userID := ctx.GetMobileAndUserID()
|
||||
if mobileNum == "" {
|
||||
return nil, fmt.Errorf("不能得到用户手机号")
|
||||
return nil, "", fmt.Errorf("不能得到用户手机号")
|
||||
}
|
||||
return GetStoreList4User(ctx, mobileNum, userID)
|
||||
storeList, err = GetStoreList4User(ctx, mobileNum, userID)
|
||||
return storeList, "", err
|
||||
}
|
||||
|
||||
func GetStoreRoleList(ctx *jxcontext.Context) (roleList []*authz.RoleInfo, err error) {
|
||||
|
||||
@@ -85,8 +85,8 @@ func (c *User2Controller) GetUsers() {
|
||||
// @router /GetMyStoreList [get]
|
||||
func (c *User2Controller) GetMyStoreList() {
|
||||
c.callGetMyStoreList(func(params *tUser2GetMyStoreListParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = cms.GetMyStoreListNew(params.Ctx)
|
||||
return retVal, "", err
|
||||
retVal, errCode, err = cms.GetMyStoreListNew(params.Ctx)
|
||||
return retVal, errCode, err
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user