aa
This commit is contained in:
@@ -466,11 +466,11 @@ func GetStoreList4User(ctx *jxcontext.Context, mobileNum, userID string) (storeL
|
|||||||
return storeList, err
|
return storeList, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetMyStoreListNew(ctx *jxcontext.Context, mobile string) (storesInfo interface{}, errCode string, err error) {
|
func GetMyStoreListNew(ctx *jxcontext.Context) (storesInfo interface{}, errCode string, err error) {
|
||||||
if !auth2.IsV2Token(ctx.GetToken()) {
|
if !auth2.IsV2Token(ctx.GetToken()) {
|
||||||
return nil, model.ErrCodeTokenIsInvalid, model.ErrTokenIsInvalid
|
return nil, model.ErrCodeTokenIsInvalid, model.ErrTokenIsInvalid
|
||||||
}
|
}
|
||||||
userID := ctx.GetUserID()
|
mobile, userID := ctx.GetMobileAndUserID()
|
||||||
if mobile == "" {
|
if mobile == "" {
|
||||||
return nil, "", fmt.Errorf("不能得到用户手机号")
|
return nil, "", fmt.Errorf("不能得到用户手机号")
|
||||||
}
|
}
|
||||||
@@ -495,6 +495,11 @@ func GetMyStoreListNew(ctx *jxcontext.Context, mobile string) (storesInfo interf
|
|||||||
return storesInfo, "", err
|
return storesInfo, "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SolveNullMobileUser(ctx *jxcontext.Context) (err error) {
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
func GetStoreRoleList(ctx *jxcontext.Context) (roleList []*authz.RoleInfo, err error) {
|
func GetStoreRoleList(ctx *jxcontext.Context) (roleList []*authz.RoleInfo, err error) {
|
||||||
return authz.StoreRoleList, nil
|
return authz.StoreRoleList, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,17 +89,29 @@ func (c *User2Controller) GetUsers() {
|
|||||||
// @Title 得到用户自己的门店列表
|
// @Title 得到用户自己的门店列表
|
||||||
// @Description 得到用户自己的门店列表
|
// @Description 得到用户自己的门店列表
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
// @Param mobile query string false "电话"
|
|
||||||
// @Success 200 {object} controllers.CallResult
|
// @Success 200 {object} controllers.CallResult
|
||||||
// @Failure 200 {object} controllers.CallResult
|
// @Failure 200 {object} controllers.CallResult
|
||||||
// @router /GetMyStoreList [get]
|
// @router /GetMyStoreList [get]
|
||||||
func (c *User2Controller) GetMyStoreList() {
|
func (c *User2Controller) GetMyStoreList() {
|
||||||
c.callGetMyStoreList(func(params *tUser2GetMyStoreListParams) (retVal interface{}, errCode string, err error) {
|
c.callGetMyStoreList(func(params *tUser2GetMyStoreListParams) (retVal interface{}, errCode string, err error) {
|
||||||
retVal, errCode, err = cms.GetMyStoreListNew(params.Ctx, params.Mobile)
|
retVal, errCode, err = cms.GetMyStoreListNew(params.Ctx)
|
||||||
return retVal, errCode, err
|
return retVal, errCode, err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 用户手机号为空,不行
|
||||||
|
// @Description 用户手机号为空,不行
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /SolveNullMobileUser [post]
|
||||||
|
func (c *User2Controller) SolveNullMobileUser() {
|
||||||
|
c.callSolveNullMobileUser(func(params *tUser2SolveNullMobileUserParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
err = cms.SolveNullMobileUser(params.Ctx)
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// @Title 得到可用的门店角色列表
|
// @Title 得到可用的门店角色列表
|
||||||
// @Description 得到可用的门店角色列表
|
// @Description 得到可用的门店角色列表
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
|
|||||||
@@ -3393,6 +3393,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"],
|
||||||
|
web.ControllerComments{
|
||||||
|
Method: "SolveNullMobileUser",
|
||||||
|
Router: `/SolveNullMobileUser`,
|
||||||
|
AllowHTTPMethods: []string{"get"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"],
|
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"],
|
||||||
web.ControllerComments{
|
web.ControllerComments{
|
||||||
Method: "GetRoleUserList",
|
Method: "GetRoleUserList",
|
||||||
|
|||||||
Reference in New Issue
Block a user