-
Notifications
You must be signed in to change notification settings - Fork 10
/
AlibabaEleEnterpriseRestaurantMixAPIRequest.go
264 lines (227 loc) · 8.29 KB
/
AlibabaEleEnterpriseRestaurantMixAPIRequest.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
package eleenterpriserestaurant
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
// AlibabaEleEnterpriseRestaurantMixAPIRequest 混合搜索店铺 API请求
// alibaba.ele.enterprise.restaurant.mix
//
// 混合搜索店铺
type AlibabaEleEnterpriseRestaurantMixAPIRequest struct {
model.Params
// 餐厅分类ids
_categoryIds []int64
// longitude和latitude用英文逗号分隔
_geo string
// 首次查询无需传入,后续需要传入前次返回
_rankId string
// 搜索关键词(关键字需要urlencode处理
_keyword string
// 查询起始位置,默认为0。如果传的是10,那么餐厅会从第11个开始返回
_start int64
// 查询数量,默认是10,最大50
_limit int64
// 人均消费金额上限,需要高于costFrom,不传表示不限
_costTo int64
// 人均消费金额下限,最低为0,不传表示不限
_costFrom int64
// 是否支持食安保(0-不限,1-支持食安保)不传表示不限
_insurance int64
// 是否可开发票(0-不限,1-可开发票)不传表示不限
_invoice int64
// 是否品牌商家(0-不限,1-品牌商家)不传表示不限
_isPremium int64
// 是否新店(0-不限,1-新店)不传表示不限
_newRestaurant int64
// 配送方式(0-不限, 1-蜂鸟专送)不传表示不限
_deliveryMode int64
// 排序选项(1-默认排序(热门), 2-评价星级由高到低, 3-起送价由低到高, 4-销量由高到低, 5-送餐速度由快到慢, 6-餐厅距离由近到远, 7-订单量由高到低)
_orderBy int64
// 是否筛选支持预定 0:不需要 1:需要(不传该字段则不筛选)
_isBookable int64
}
// NewAlibabaEleEnterpriseRestaurantMixRequest 初始化AlibabaEleEnterpriseRestaurantMixAPIRequest对象
func NewAlibabaEleEnterpriseRestaurantMixRequest() *AlibabaEleEnterpriseRestaurantMixAPIRequest {
return &AlibabaEleEnterpriseRestaurantMixAPIRequest{
Params: model.NewParams(),
}
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetApiMethodName() string {
return "alibaba.ele.enterprise.restaurant.mix"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetCategoryIds is CategoryIds Setter
// 餐厅分类ids
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetCategoryIds(_categoryIds []int64) error {
r._categoryIds = _categoryIds
r.Set("category_ids", _categoryIds)
return nil
}
// GetCategoryIds CategoryIds Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetCategoryIds() []int64 {
return r._categoryIds
}
// SetGeo is Geo Setter
// longitude和latitude用英文逗号分隔
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetGeo(_geo string) error {
r._geo = _geo
r.Set("geo", _geo)
return nil
}
// GetGeo Geo Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetGeo() string {
return r._geo
}
// SetRankId is RankId Setter
// 首次查询无需传入,后续需要传入前次返回
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetRankId(_rankId string) error {
r._rankId = _rankId
r.Set("rank_id", _rankId)
return nil
}
// GetRankId RankId Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetRankId() string {
return r._rankId
}
// SetKeyword is Keyword Setter
// 搜索关键词(关键字需要urlencode处理
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetKeyword(_keyword string) error {
r._keyword = _keyword
r.Set("keyword", _keyword)
return nil
}
// GetKeyword Keyword Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetKeyword() string {
return r._keyword
}
// SetStart is Start Setter
// 查询起始位置,默认为0。如果传的是10,那么餐厅会从第11个开始返回
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetStart(_start int64) error {
r._start = _start
r.Set("start", _start)
return nil
}
// GetStart Start Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetStart() int64 {
return r._start
}
// SetLimit is Limit Setter
// 查询数量,默认是10,最大50
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetLimit(_limit int64) error {
r._limit = _limit
r.Set("limit", _limit)
return nil
}
// GetLimit Limit Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetLimit() int64 {
return r._limit
}
// SetCostTo is CostTo Setter
// 人均消费金额上限,需要高于costFrom,不传表示不限
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetCostTo(_costTo int64) error {
r._costTo = _costTo
r.Set("cost_to", _costTo)
return nil
}
// GetCostTo CostTo Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetCostTo() int64 {
return r._costTo
}
// SetCostFrom is CostFrom Setter
// 人均消费金额下限,最低为0,不传表示不限
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetCostFrom(_costFrom int64) error {
r._costFrom = _costFrom
r.Set("cost_from", _costFrom)
return nil
}
// GetCostFrom CostFrom Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetCostFrom() int64 {
return r._costFrom
}
// SetInsurance is Insurance Setter
// 是否支持食安保(0-不限,1-支持食安保)不传表示不限
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetInsurance(_insurance int64) error {
r._insurance = _insurance
r.Set("insurance", _insurance)
return nil
}
// GetInsurance Insurance Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetInsurance() int64 {
return r._insurance
}
// SetInvoice is Invoice Setter
// 是否可开发票(0-不限,1-可开发票)不传表示不限
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetInvoice(_invoice int64) error {
r._invoice = _invoice
r.Set("invoice", _invoice)
return nil
}
// GetInvoice Invoice Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetInvoice() int64 {
return r._invoice
}
// SetIsPremium is IsPremium Setter
// 是否品牌商家(0-不限,1-品牌商家)不传表示不限
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetIsPremium(_isPremium int64) error {
r._isPremium = _isPremium
r.Set("is_premium", _isPremium)
return nil
}
// GetIsPremium IsPremium Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetIsPremium() int64 {
return r._isPremium
}
// SetNewRestaurant is NewRestaurant Setter
// 是否新店(0-不限,1-新店)不传表示不限
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetNewRestaurant(_newRestaurant int64) error {
r._newRestaurant = _newRestaurant
r.Set("new_restaurant", _newRestaurant)
return nil
}
// GetNewRestaurant NewRestaurant Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetNewRestaurant() int64 {
return r._newRestaurant
}
// SetDeliveryMode is DeliveryMode Setter
// 配送方式(0-不限, 1-蜂鸟专送)不传表示不限
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetDeliveryMode(_deliveryMode int64) error {
r._deliveryMode = _deliveryMode
r.Set("delivery_mode", _deliveryMode)
return nil
}
// GetDeliveryMode DeliveryMode Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetDeliveryMode() int64 {
return r._deliveryMode
}
// SetOrderBy is OrderBy Setter
// 排序选项(1-默认排序(热门), 2-评价星级由高到低, 3-起送价由低到高, 4-销量由高到低, 5-送餐速度由快到慢, 6-餐厅距离由近到远, 7-订单量由高到低)
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetOrderBy(_orderBy int64) error {
r._orderBy = _orderBy
r.Set("order_by", _orderBy)
return nil
}
// GetOrderBy OrderBy Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetOrderBy() int64 {
return r._orderBy
}
// SetIsBookable is IsBookable Setter
// 是否筛选支持预定 0:不需要 1:需要(不传该字段则不筛选)
func (r *AlibabaEleEnterpriseRestaurantMixAPIRequest) SetIsBookable(_isBookable int64) error {
r._isBookable = _isBookable
r.Set("is_bookable", _isBookable)
return nil
}
// GetIsBookable IsBookable Getter
func (r AlibabaEleEnterpriseRestaurantMixAPIRequest) GetIsBookable() int64 {
return r._isBookable
}