aa
This commit is contained in:
@@ -466,16 +466,18 @@ func GetStoreList4User(ctx *jxcontext.Context, mobileNum, userID string) (storeL
|
||||
return storeList, err
|
||||
}
|
||||
|
||||
func GetMyStoreListNew(ctx *jxcontext.Context) (storesInfo interface{}, errCode string, err error) {
|
||||
func GetMyStoreListNew(ctx *jxcontext.Context, mobile string) (storesInfo interface{}, 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("不能得到用户手机号")
|
||||
}
|
||||
_, userID := ctx.GetMobileAndUserID()
|
||||
//if mobileNum == "" {
|
||||
//userID := ctx.GetUserID()
|
||||
//dao.GetUserByID()
|
||||
//return nil, "", fmt.Errorf("不能得到用户手机号")
|
||||
//}
|
||||
var storeList []*dao.StoreWithCityName
|
||||
if storeList, err = GetStoreList4User(ctx, mobileNum, userID); err == nil && len(storeList) > 0 {
|
||||
if storeList, err = GetStoreList4User(ctx, mobile, userID); err == nil && len(storeList) > 0 {
|
||||
// todo,应该用通用方法
|
||||
mapDataList := make([]map[string]interface{}, len(storeList))
|
||||
for k, v := range storeList {
|
||||
|
||||
@@ -89,12 +89,13 @@ func (c *User2Controller) GetUsers() {
|
||||
// @Title 得到用户自己的门店列表
|
||||
// @Description 得到用户自己的门店列表
|
||||
// @Param token header string true "认证token"
|
||||
// @Param mobile query string false "电话"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetMyStoreList [get]
|
||||
func (c *User2Controller) GetMyStoreList() {
|
||||
c.callGetMyStoreList(func(params *tUser2GetMyStoreListParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, errCode, err = cms.GetMyStoreListNew(params.Ctx)
|
||||
retVal, errCode, err = cms.GetMyStoreListNew(params.Ctx, params.Mobile)
|
||||
return retVal, errCode, err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user