GetStoreListByLocation排除只能预订单店
This commit is contained in:
@@ -1054,3 +1054,31 @@ func DeleteUserInfo(ctx *jxcontext.Context, userID string) (err error) {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func GetMyJxStoreList(ctx *jxcontext.Context, mobile string) (storesInfo interface{}, err error) {
|
||||
db := dao.GetDB()
|
||||
user, err := dao.GetUserByID(db, "mobile", mobile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
userID := user.UserID
|
||||
var storeList []*dao.StoreWithCityName
|
||||
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 {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user