diff --git a/business/jxstore/cms/user2.go b/business/jxstore/cms/user2.go index 55c9d1358..777f9e85b 100644 --- a/business/jxstore/cms/user2.go +++ b/business/jxstore/cms/user2.go @@ -368,7 +368,7 @@ func GetStoreList4User(ctx *jxcontext.Context, mobileNum, userID string) (storeL return storeList, err } -func GetMyStoreListNew(ctx *jxcontext.Context) (storeList []*dao.StoreWithCityName, errCode string, err error) { +func GetMyStoreListNew(ctx *jxcontext.Context) (storesInfo interface{}, errCode string, err error) { if !auth2.IsV2Token(ctx.GetToken()) { return nil, model.ErrCodeTokenIsInvalid, model.ErrTokenIsInvalid } @@ -376,8 +376,25 @@ func GetMyStoreListNew(ctx *jxcontext.Context) (storeList []*dao.StoreWithCityNa if mobileNum == "" { return nil, "", fmt.Errorf("不能得到用户手机号") } - storeList, err = GetStoreList4User(ctx, mobileNum, userID) - return storeList, "", err + var storeList []*dao.StoreWithCityName + if storeList, err = GetStoreList4User(ctx, mobileNum, userID); err == nil && len(storeList) > 0 { + // todo,应该用通过方法 + mapDataList := make([]map[string]interface{}, len(storeList)) + for k, v := range storeList { + mapDataList[k] = map[string]interface{}{ + "id": v.ID, + "address": v.Address, + "cityName": v.CityName, + "name": v.Name, + "tel1": v.Tel1, + "tel2": v.Tel2, + "payeeName": v.PayeeName, + "status": v.Status, + } + } + storesInfo = mapDataList + } + return storesInfo, "", err } func GetStoreRoleList(ctx *jxcontext.Context) (roleList []*authz.RoleInfo, err error) {