1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Abbotton\DouDian\Api; |
4
|
|
|
|
5
|
|
|
use Illuminate\Http\Client\RequestException; |
6
|
|
|
use Psr\SimpleCache\InvalidArgumentException; |
7
|
|
|
|
8
|
|
|
class BuyIn extends BaseRequest |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* 商品定向计划管理. |
12
|
|
|
* |
13
|
|
|
* @param array $params |
14
|
|
|
* |
15
|
|
|
* @throws RequestException |
16
|
|
|
* @throws InvalidArgumentException |
17
|
|
|
* |
18
|
|
|
* @return array |
19
|
|
|
*/ |
20
|
|
|
public function orienPlanCtrl(array $params): array |
21
|
|
|
{ |
22
|
|
|
return $this->httpPost('buyin/orienPlanCtrl', $params); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* 商品定向计划查询. |
27
|
|
|
* |
28
|
|
|
* @param array $params |
29
|
|
|
* |
30
|
|
|
* @throws InvalidArgumentException |
31
|
|
|
* @throws RequestException |
32
|
|
|
* |
33
|
|
|
* @return array |
34
|
|
|
*/ |
35
|
|
|
public function orienPlanList(array $params): array |
36
|
|
|
{ |
37
|
|
|
return $this->httpPost('buyin/orienPlanList', $params); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* 向指定定向计划中添加达人. |
42
|
|
|
* |
43
|
|
|
* @param array $params |
44
|
|
|
* |
45
|
|
|
* @throws InvalidArgumentException |
46
|
|
|
* @throws RequestException |
47
|
|
|
* |
48
|
|
|
* @return array |
49
|
|
|
*/ |
50
|
|
|
public function orienPlanAuthorsAdd(array $params): array |
51
|
|
|
{ |
52
|
|
|
return $this->httpPost('buyin/orienPlanAuthorsAdd', $params); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* 定向计划达人申请审核. |
57
|
|
|
* |
58
|
|
|
* @param array $params |
59
|
|
|
* |
60
|
|
|
* @throws InvalidArgumentException |
61
|
|
|
* @throws RequestException |
62
|
|
|
* |
63
|
|
|
* @return array |
64
|
|
|
*/ |
65
|
|
|
public function orienPlanAudit(array $params): array |
66
|
|
|
{ |
67
|
|
|
return $this->httpPost('buyin/orienPlanAudit', $params); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* 创建/修改商品定向计划. |
72
|
|
|
* |
73
|
|
|
* @param array $params |
74
|
|
|
* |
75
|
|
|
* @throws InvalidArgumentException |
76
|
|
|
* @throws RequestException |
77
|
|
|
* |
78
|
|
|
* @return array |
79
|
|
|
*/ |
80
|
|
|
public function createOrUpdateOrienPlan(array $params): array |
81
|
|
|
{ |
82
|
|
|
return $this->httpPost('buyin/createOrUpdateOrienPlan', $params); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* 查询定向计划作者列表. |
87
|
|
|
* |
88
|
|
|
* @param array $params |
89
|
|
|
* |
90
|
|
|
* @throws InvalidArgumentException |
91
|
|
|
* @throws RequestException |
92
|
|
|
* |
93
|
|
|
* @return array |
94
|
|
|
*/ |
95
|
|
|
public function orienPlanAuthors(array $params): array |
96
|
|
|
{ |
97
|
|
|
return $this->httpPost('buyin/orienPlanAuthors', $params); |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* 团长活动查询接口. |
102
|
|
|
* |
103
|
|
|
* @param array $params |
104
|
|
|
* |
105
|
|
|
* @throws InvalidArgumentException |
106
|
|
|
* @throws RequestException |
107
|
|
|
* |
108
|
|
|
* @return array |
109
|
|
|
*/ |
110
|
|
|
public function activitySearch(array $params): array |
111
|
|
|
{ |
112
|
|
|
return $this->httpPost('buyin/activitySearch', $params); |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* 商品团长活动提报接口. |
117
|
|
|
* |
118
|
|
|
* @param array $params |
119
|
|
|
* |
120
|
|
|
* @throws InvalidArgumentException |
121
|
|
|
* @throws RequestException |
122
|
|
|
* |
123
|
|
|
* @return array |
124
|
|
|
*/ |
125
|
|
|
public function applyActivities(array $params): array |
126
|
|
|
{ |
127
|
|
|
return $this->httpPost('buyin/applyActivities', $params); |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* 创建/修改商品专属推广计划. |
132
|
|
|
* |
133
|
|
|
* @param array $params |
134
|
|
|
* |
135
|
|
|
* @throws InvalidArgumentException |
136
|
|
|
* @throws RequestException |
137
|
|
|
* |
138
|
|
|
* @return array |
139
|
|
|
*/ |
140
|
|
|
public function exclusivePlan(array $params): array |
141
|
|
|
{ |
142
|
|
|
return $this->httpPost('buyin/exclusivePlan', $params); |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* 创建/修改普通商品推广计划. |
147
|
|
|
* |
148
|
|
|
* @param array $params |
149
|
|
|
* |
150
|
|
|
* @throws InvalidArgumentException |
151
|
|
|
* @throws RequestException |
152
|
|
|
* |
153
|
|
|
* @return array |
154
|
|
|
*/ |
155
|
|
|
public function simplePlan(array $params): array |
156
|
|
|
{ |
157
|
|
|
return $this->httpPost('buyin/simplePlan', $params); |
158
|
|
|
} |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* 机构查询达人直播间分销订单. |
162
|
|
|
* |
163
|
|
|
* @param array $params |
164
|
|
|
* |
165
|
|
|
* @throws InvalidArgumentException |
166
|
|
|
* @throws RequestException |
167
|
|
|
* |
168
|
|
|
* @return array |
169
|
|
|
*/ |
170
|
|
|
public function instituteOrderAds(array $params): array |
171
|
|
|
{ |
172
|
|
|
return $this->httpPost('buyin/instituteOrderAds', $params); |
173
|
|
|
} |
174
|
|
|
|
175
|
|
|
/** |
176
|
|
|
* 商品状态查询. |
177
|
|
|
* |
178
|
|
|
* @param array $params |
179
|
|
|
* @return array |
180
|
|
|
* @throws InvalidArgumentException |
181
|
|
|
* @throws RequestException |
182
|
|
|
*/ |
183
|
|
|
public function materialsProductStatus(array $params): array |
184
|
|
|
{ |
185
|
|
|
return $this->httpPost('buyin/materialsProductStatus', $params); |
186
|
|
|
} |
187
|
|
|
|
188
|
|
|
/** |
189
|
|
|
* 查询机构联盟订单. |
190
|
|
|
* |
191
|
|
|
* @param array $params |
192
|
|
|
* @return array |
193
|
|
|
* @throws InvalidArgumentException |
194
|
|
|
* @throws RequestException |
195
|
|
|
*/ |
196
|
|
|
public function queryInstituteOrders(array $params): array |
197
|
|
|
{ |
198
|
|
|
return $this->httpPost('buyin/queryInstituteOrders', $params); |
199
|
|
|
} |
200
|
|
|
|
201
|
|
|
/** |
202
|
|
|
* 达人PID创建. |
203
|
|
|
* |
204
|
|
|
* @param array $params |
205
|
|
|
* @return array |
206
|
|
|
* @throws InvalidArgumentException |
207
|
|
|
* @throws RequestException |
208
|
|
|
*/ |
209
|
|
|
public function kolPidCreate(array $params): array |
210
|
|
|
{ |
211
|
|
|
return $this->httpPost('buyin/kolPidCreate', $params); |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* 达人PID查询接口. |
216
|
|
|
* |
217
|
|
|
* @param array $params |
218
|
|
|
* @return array |
219
|
|
|
* @throws InvalidArgumentException |
220
|
|
|
* @throws RequestException |
221
|
|
|
*/ |
222
|
|
|
public function kolPidList(array $params): array |
223
|
|
|
{ |
224
|
|
|
return $this->httpPost('buyin/kolPidList', $params); |
225
|
|
|
} |
226
|
|
|
|
227
|
|
|
/** |
228
|
|
|
* 达人PID 编辑. |
229
|
|
|
* |
230
|
|
|
* @param array $params |
231
|
|
|
* @return array |
232
|
|
|
* @throws InvalidArgumentException |
233
|
|
|
* @throws RequestException |
234
|
|
|
*/ |
235
|
|
|
public function kolPidEdit(array $params): array |
236
|
|
|
{ |
237
|
|
|
return $this->httpPost('buyin/kolPidEdit', $params); |
238
|
|
|
} |
239
|
|
|
|
240
|
|
|
/** |
241
|
|
|
* 达人PID删除. |
242
|
|
|
* |
243
|
|
|
* @param array $params |
244
|
|
|
* @return array |
245
|
|
|
* @throws InvalidArgumentException |
246
|
|
|
* @throws RequestException |
247
|
|
|
*/ |
248
|
|
|
public function kolPidDel(array $params): array |
249
|
|
|
{ |
250
|
|
|
return $this->httpPost('buyin/kolPidDel', $params); |
251
|
|
|
} |
252
|
|
|
|
253
|
|
|
/** |
254
|
|
|
* 商品分销转链. |
255
|
|
|
* |
256
|
|
|
* @param array $params |
257
|
|
|
* @return array |
258
|
|
|
* @throws InvalidArgumentException |
259
|
|
|
* @throws RequestException |
260
|
|
|
*/ |
261
|
|
|
public function kolProductShare(array $params): array |
262
|
|
|
{ |
263
|
|
|
return $this->httpPost('buyin/kolProductShare', $params); |
264
|
|
|
} |
265
|
|
|
|
266
|
|
|
/** |
267
|
|
|
* 机构PID创建. |
268
|
|
|
* |
269
|
|
|
* @param array $params |
270
|
|
|
* @return array |
271
|
|
|
* @throws InvalidArgumentException |
272
|
|
|
* @throws RequestException |
273
|
|
|
*/ |
274
|
|
|
public function institutePidCreate(array $params): array |
275
|
|
|
{ |
276
|
|
|
return $this->httpPost('buyin/institutePidCreate', $params); |
277
|
|
|
} |
278
|
|
|
|
279
|
|
|
/** |
280
|
|
|
* 机构PID 编辑. |
281
|
|
|
* |
282
|
|
|
* @param array $params |
283
|
|
|
* @return array |
284
|
|
|
* @throws InvalidArgumentException |
285
|
|
|
* @throws RequestException |
286
|
|
|
*/ |
287
|
|
|
public function institutePidEdit(array $params): array |
288
|
|
|
{ |
289
|
|
|
return $this->httpPost('buyin/institutePidEdit', $params); |
290
|
|
|
} |
291
|
|
|
|
292
|
|
|
/** |
293
|
|
|
* 机构PID删除. |
294
|
|
|
* |
295
|
|
|
* @param array $params |
296
|
|
|
* @return array |
297
|
|
|
* @throws InvalidArgumentException |
298
|
|
|
* @throws RequestException |
299
|
|
|
*/ |
300
|
|
|
public function institutePidDel(array $params): array |
301
|
|
|
{ |
302
|
|
|
return $this->httpPost('buyin/institutePidDel', $params); |
303
|
|
|
} |
304
|
|
|
|
305
|
|
|
/** |
306
|
|
|
* 直播间分销物料查询. |
307
|
|
|
* |
308
|
|
|
* @param array $params |
309
|
|
|
* @return array |
310
|
|
|
* @throws InvalidArgumentException |
311
|
|
|
* @throws RequestException |
312
|
|
|
*/ |
313
|
|
|
public function liveShareMaterial(array $params): array |
314
|
|
|
{ |
315
|
|
|
return $this->httpPost('buyin/liveShareMaterial', $params); |
316
|
|
|
} |
317
|
|
|
|
318
|
|
|
/** |
319
|
|
|
* 机构获取达人直播间分享链接. |
320
|
|
|
* |
321
|
|
|
* @param array $params |
322
|
|
|
* @return array |
323
|
|
|
* @throws InvalidArgumentException |
324
|
|
|
* @throws RequestException |
325
|
|
|
*/ |
326
|
|
|
public function instituteLiveShare(array $params): array |
327
|
|
|
{ |
328
|
|
|
return $this->httpPost('buyin/instituteLiveShare', $params); |
329
|
|
|
} |
330
|
|
|
|
331
|
|
|
/** |
332
|
|
|
* 机构PID查询接口. |
333
|
|
|
* |
334
|
|
|
* @param array $params |
335
|
|
|
* @return array |
336
|
|
|
* @throws InvalidArgumentException |
337
|
|
|
* @throws RequestException |
338
|
|
|
*/ |
339
|
|
|
public function institutePidList(array $params): array |
340
|
|
|
{ |
341
|
|
|
return $this->httpPost('buyin/institutePidList', $params); |
342
|
|
|
} |
343
|
|
|
|
344
|
|
|
/** |
345
|
|
|
* 查询达人直播间分销订单. |
346
|
|
|
* |
347
|
|
|
* @param array $params |
348
|
|
|
* @return array |
349
|
|
|
* @throws InvalidArgumentException |
350
|
|
|
* @throws RequestException |
351
|
|
|
*/ |
352
|
|
|
public function kolOrderAds(array $params): array |
353
|
|
|
{ |
354
|
|
|
return $this->httpPost('buyin/kolOrderAds', $params); |
355
|
|
|
} |
356
|
|
|
} |
357
|
|
|
|