|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace CloudyCity\UCMarketingSDK\Order; |
|
4
|
|
|
|
|
5
|
|
|
use CloudyCity\UCMarketingSDK\Kernel\BaseClient; |
|
6
|
|
|
|
|
7
|
|
|
class Client extends BaseClient |
|
8
|
|
|
{ |
|
9
|
|
|
/** |
|
10
|
|
|
* 根据订单id获取订单. |
|
11
|
|
|
* |
|
12
|
|
|
* @param array $orderIds |
|
13
|
|
|
* |
|
14
|
|
|
* @throws \CloudyCity\UCMarketingSDK\Kernel\Exceptions\ApiException |
|
15
|
|
|
* @throws \CloudyCity\UCMarketingSDK\Kernel\Exceptions\InvalidArgumentException |
|
16
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
17
|
|
|
* |
|
18
|
|
|
* @return array|\Doctrine\Common\Collections\ArrayCollection|object|\Psr\Http\Message\ResponseInterface|string |
|
19
|
|
|
*/ |
|
20
|
|
|
public function getByIds(array $orderIds) |
|
21
|
|
|
{ |
|
22
|
|
|
$params = [ |
|
23
|
|
|
'orderIds' => $orderIds, |
|
24
|
|
|
]; |
|
25
|
|
|
|
|
26
|
|
|
return $this->httpPostJson('goodsorder/getOrderByOrderId', $params); |
|
27
|
|
|
} |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* 获取指定日期内的订单. |
|
31
|
|
|
* |
|
32
|
|
|
* @param string $startDate |
|
33
|
|
|
* @param string $endDate |
|
34
|
|
|
* |
|
35
|
|
|
* @throws \CloudyCity\UCMarketingSDK\Kernel\Exceptions\ApiException |
|
36
|
|
|
* @throws \CloudyCity\UCMarketingSDK\Kernel\Exceptions\InvalidArgumentException |
|
37
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
38
|
|
|
* |
|
39
|
|
|
* @return array|\Doctrine\Common\Collections\ArrayCollection|object|\Psr\Http\Message\ResponseInterface|string |
|
40
|
|
|
*/ |
|
41
|
|
|
public function get($startDate, $endDate) |
|
42
|
|
|
{ |
|
43
|
|
|
$params = [ |
|
44
|
|
|
'startDate' => $startDate, |
|
45
|
|
|
'endDate' => $endDate, |
|
46
|
|
|
]; |
|
47
|
|
|
|
|
48
|
|
|
return $this->httpPostJson('goodsorder/getAllOrder', $params); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* 获取指定日期内的订单Id. |
|
53
|
|
|
* |
|
54
|
|
|
* @param string $startDate |
|
55
|
|
|
* @param string $endDate |
|
56
|
|
|
* |
|
57
|
|
|
* @throws \CloudyCity\UCMarketingSDK\Kernel\Exceptions\ApiException |
|
58
|
|
|
* @throws \CloudyCity\UCMarketingSDK\Kernel\Exceptions\InvalidArgumentException |
|
59
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
60
|
|
|
* |
|
61
|
|
|
* @return array|\Doctrine\Common\Collections\ArrayCollection|object|\Psr\Http\Message\ResponseInterface|string |
|
62
|
|
|
*/ |
|
63
|
|
|
public function getIds($startDate, $endDate) |
|
64
|
|
|
{ |
|
65
|
|
|
$params = [ |
|
66
|
|
|
'startDate' => $startDate, |
|
67
|
|
|
'endDate' => $endDate, |
|
68
|
|
|
]; |
|
69
|
|
|
|
|
70
|
|
|
return $this->httpPostJson('goodsorder/getAllOrderId', $params); |
|
71
|
|
|
} |
|
72
|
|
|
} |
|
73
|
|
|
|