This commit is contained in:
suyl
2021-04-28 17:22:40 +08:00
parent d9f3294893
commit 199ac9e495
2 changed files with 10 additions and 7 deletions

View File

@@ -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 {