1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Abbotton\DouDian\Api; |
4
|
|
|
|
5
|
|
|
use Illuminate\Http\Client\RequestException; |
6
|
|
|
use Psr\SimpleCache\InvalidArgumentException; |
7
|
|
|
|
8
|
|
|
class Iop extends BaseRequest |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* 查询店铺身份. |
12
|
|
|
* |
13
|
|
|
* @throws RequestException |
14
|
|
|
* @throws InvalidArgumentException |
15
|
|
|
* |
16
|
|
|
* @return array |
17
|
|
|
*/ |
18
|
|
|
public function roleGet(): array |
19
|
|
|
{ |
20
|
|
|
return $this->httpPost('iop/roleGet'); |
21
|
|
|
} |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* 根据更新时间查询代打订单列表. |
25
|
|
|
* |
26
|
|
|
* @param array $params |
27
|
|
|
* |
28
|
|
|
* @throws InvalidArgumentException |
29
|
|
|
* @throws RequestException |
30
|
|
|
* |
31
|
|
|
* @return array |
32
|
|
|
*/ |
33
|
|
|
public function orderList(array $params): array |
34
|
|
|
{ |
35
|
|
|
return $this->httpPost('iop/orderList', $params); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* 电子面单取号. |
40
|
|
|
* |
41
|
|
|
* @throws InvalidArgumentException |
42
|
|
|
* @throws RequestException |
43
|
|
|
* |
44
|
|
|
* @return array |
45
|
|
|
*/ |
46
|
|
|
public function waybillGet(): array |
47
|
|
|
{ |
48
|
|
|
return $this->httpPost('iop/waybillGet'); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* 取消电子面单. |
53
|
|
|
* |
54
|
|
|
* @param array $params |
55
|
|
|
* |
56
|
|
|
* @throws InvalidArgumentException |
57
|
|
|
* @throws RequestException |
58
|
|
|
* |
59
|
|
|
* @return array |
60
|
|
|
*/ |
61
|
|
|
public function waybillCancel(array $params): array |
62
|
|
|
{ |
63
|
|
|
return $this->httpPost('iop/waybillCancel', $params); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* 电子面单回传并发货. |
68
|
|
|
* |
69
|
|
|
* @param array $params |
70
|
|
|
* |
71
|
|
|
* @throws InvalidArgumentException |
72
|
|
|
* @throws RequestException |
73
|
|
|
* |
74
|
|
|
* @return array |
75
|
|
|
*/ |
76
|
|
|
public function waybillReturn(array $params): array |
77
|
|
|
{ |
78
|
|
|
return $this->httpPost('iop/waybillReturn', $params); |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* 更新电子面单. |
83
|
|
|
* |
84
|
|
|
* @param array $params |
85
|
|
|
* |
86
|
|
|
* @throws InvalidArgumentException |
87
|
|
|
* @throws RequestException |
88
|
|
|
* |
89
|
|
|
* @return array |
90
|
|
|
*/ |
91
|
|
|
public function waybillUpdate(array $params): array |
92
|
|
|
{ |
93
|
|
|
return $this->httpPost('iop/waybillUpdate', $params); |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* 订单详情. |
98
|
|
|
* |
99
|
|
|
* @param array $params |
100
|
|
|
* |
101
|
|
|
* @throws InvalidArgumentException |
102
|
|
|
* @throws RequestException |
103
|
|
|
* |
104
|
|
|
* @return array |
105
|
|
|
*/ |
106
|
|
|
public function orderInfo(array $params): array |
107
|
|
|
{ |
108
|
|
|
return $this->httpPost('iop/orderInfo', $params); |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* 【商家】分配代发订单. |
113
|
|
|
* |
114
|
|
|
* @param array $params |
115
|
|
|
* @return array |
116
|
|
|
* @throws InvalidArgumentException |
117
|
|
|
* @throws RequestException |
118
|
|
|
*/ |
119
|
|
|
public function sellerDistribute(array $params): array |
120
|
|
|
{ |
121
|
|
|
return $this->httpPost('iop/sellerDistribute', $params); |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* 【商家】查看代发订单详情. |
126
|
|
|
* |
127
|
|
|
* @param array $params |
128
|
|
|
* @return array |
129
|
|
|
* @throws InvalidArgumentException |
130
|
|
|
* @throws RequestException |
131
|
|
|
*/ |
132
|
|
|
public function sellerOrderInfo(array $params): array |
133
|
|
|
{ |
134
|
|
|
return $this->httpPost('iop/sellerOrderInfo', $params); |
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* 【商家】查看代发订单列表. |
139
|
|
|
* |
140
|
|
|
* @param array $params |
141
|
|
|
* @return array |
142
|
|
|
* @throws InvalidArgumentException |
143
|
|
|
* @throws RequestException |
144
|
|
|
*/ |
145
|
|
|
public function sellerOrderList(array $params): array |
146
|
|
|
{ |
147
|
|
|
return $this->httpPost('iop/sellerOrderList', $params); |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* 【商家】查询厂商管理列表. |
152
|
|
|
* |
153
|
|
|
* @param array $params |
154
|
|
|
* @return array |
155
|
|
|
* @throws InvalidArgumentException |
156
|
|
|
* @throws RequestException |
157
|
|
|
*/ |
158
|
|
|
public function sellerSupplierList(array $params): array |
159
|
|
|
{ |
160
|
|
|
return $this->httpPost('iop/sellerSupplierList', $params); |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* 【商家】取消分配代发订单. |
165
|
|
|
* |
166
|
|
|
* @param array $params |
167
|
|
|
* @return array |
168
|
|
|
* @throws InvalidArgumentException |
169
|
|
|
* @throws RequestException |
170
|
|
|
*/ |
171
|
|
|
public function sellerCancleDistribute(array $params): array |
172
|
|
|
{ |
173
|
|
|
return $this->httpPost('iop/sellerCancleDistribute', $params); |
174
|
|
|
} |
175
|
|
|
|
176
|
|
|
/** |
177
|
|
|
* 【厂家】查询商家列表. |
178
|
|
|
* |
179
|
|
|
* @param array $params |
180
|
|
|
* @return array |
181
|
|
|
* @throws InvalidArgumentException |
182
|
|
|
* @throws RequestException |
183
|
|
|
*/ |
184
|
|
|
public function getSellerList(array $params): array |
185
|
|
|
{ |
186
|
|
|
return $this->httpPost('iop/getSellerList', $params); |
187
|
|
|
} |
188
|
|
|
} |
189
|
|
|
|