Skip to content

Commit a2d3c8a

Browse files
authored
Merge pull request #4 from maiscrm/feat-add-jd
add address request file
2 parents eb2a977 + 150d0bc commit a2d3c8a

8 files changed

+231
-84
lines changed

jd/request/AreasCityGetRequest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
namespace Jd\request;
3+
4+
class AreasCityGetRequest
5+
{
6+
private $apiParas = array();
7+
private $parentId;
8+
9+
public function getApiMethodName()
10+
{
11+
return "jingdong.areas.city.get";
12+
}
13+
14+
public function getApiParas()
15+
{
16+
return json_encode($this->apiParas);
17+
}
18+
19+
public function check()
20+
{
21+
}
22+
23+
public function putOtherTextParam($key, $value)
24+
{
25+
$this->apiParas[$key] = $value;
26+
$this->$key = $value;
27+
}
28+
29+
public function setParentId($parentId)
30+
{
31+
$this->parentId = $parentId;
32+
$this->apiParas["parent_id"] = $parentId;
33+
}
34+
35+
public function getParentId()
36+
{
37+
return $this->parentId;
38+
}
39+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
namespace Jd\request;
3+
4+
class AreasCountyGetRequest
5+
{
6+
private $apiParas = array();
7+
private $parentId;
8+
9+
public function getApiMethodName()
10+
{
11+
return "jingdong.areas.county.get";
12+
}
13+
14+
public function getApiParas()
15+
{
16+
return json_encode($this->apiParas);
17+
}
18+
19+
public function check()
20+
{
21+
22+
}
23+
24+
public function putOtherTextParam($key, $value)
25+
{
26+
$this->apiParas[$key] = $value;
27+
$this->$key = $value;
28+
}
29+
30+
public function setParentId($parentId)
31+
{
32+
$this->parentId = $parentId;
33+
$this->apiParas["parent_id"] = $parentId;
34+
}
35+
36+
public function getParentId()
37+
{
38+
return $this->parentId;
39+
}
40+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
namespace Jd\request;
3+
4+
class AreasProvinceGetRequest
5+
{
6+
private $apiParas = array();
7+
8+
public function getApiMethodName()
9+
{
10+
return "jingdong.areas.province.get";
11+
}
12+
13+
public function getApiParas()
14+
{
15+
return json_encode(new \stdClass());
16+
}
17+
18+
public function check()
19+
{
20+
}
21+
22+
public function putOtherTextParam($key, $value)
23+
{
24+
$this->apiParas[$key] = $value;
25+
$this->$key = $value;
26+
}
27+
}

jd/request/AreasTownGetRequest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
namespace Jd\request;
3+
4+
class AreasTownGetRequest
5+
{
6+
private $apiParas = array();
7+
private $parentId;
8+
9+
public function getApiMethodName()
10+
{
11+
return "jingdong.areas.town.get";
12+
}
13+
14+
public function getApiParas()
15+
{
16+
return json_encode($this->apiParas);
17+
}
18+
19+
public function check(){
20+
21+
}
22+
23+
public function putOtherTextParam($key, $value)
24+
{
25+
$this->apiParas[$key] = $value;
26+
$this->$key = $value;
27+
}
28+
29+
public function setParentId($parentId)
30+
{
31+
$this->parentId = $parentId;
32+
$this->apiParas["parent_id"] = $parentId;
33+
}
34+
35+
public function getParentId()
36+
{
37+
return $this->parentId;
38+
}
39+
}

jd/request/PopJmGetUserBaseInfoByPinRequest.php

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,46 @@ class PopJmGetUserBaseInfoByPinRequest
77
private $pin;
88
private $loadType;
99

10-
public function getApiMethodName() {
11-
return "jingdong.pop.jm.getUserBaseInfoByPin";
10+
public function getApiMethodName()
11+
{
12+
return "jingdong.pop.jm.getUserBaseInfoByPin";
1213
}
1314

14-
public function getApiParas() {
15+
public function getApiParas()
16+
{
1517
return json_encode($this->apiParas);
1618
}
1719

18-
public function check(){
19-
20+
public function check()
21+
{
2022
}
2123

22-
public function putOtherTextParam($key, $value) {
24+
public function putOtherTextParam($key, $value)
25+
{
2326
$this->apiParas[$key] = $value;
2427
$this->$key = $value;
2528
}
2629

27-
public function setPin($pin) {
30+
public function setPin($pin)
31+
{
2832
$this->pin = $pin;
29-
$this->apiParas["pin"] = $pin;
33+
$this->apiParas["pin"] = $pin;
3034
}
3135

32-
public function getPin() {
33-
return $this->pin;
36+
public function getPin()
37+
{
38+
return $this->pin;
3439
}
3540

3641

37-
public function setLoadType($loadType) {
42+
public function setLoadType($loadType)
43+
{
3844
$this->loadType = $loadType;
39-
$this->apiParas["loadType"] = $loadType;
45+
$this->apiParas["loadType"] = $loadType;
4046
}
4147

42-
public function getLoadType() {
43-
return $this->loadType;
48+
public function getLoadType()
49+
{
50+
return $this->loadType;
4451
}
4552
}
46-
47-
48-
49-
50-
51-
52-
53-

jd/request/PopOrderSearchRequest.php

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,101 +13,112 @@ class PopOrderSearchRequest
1313
private $sortType;
1414
private $dateType;
1515

16-
public function getApiMethodName() {
16+
public function getApiMethodName()
17+
{
1718
return "jingdong.pop.order.search";
1819
}
1920

20-
public function getApiParas() {
21+
public function getApiParas()
22+
{
2123
return json_encode($this->apiParas);
2224
}
2325

24-
public function check() {
25-
26+
public function check()
27+
{
2628
}
2729

28-
public function putOtherTextParam($key, $value) {
30+
public function putOtherTextParam($key, $value)
31+
{
2932
$this->apiParas[$key] = $value;
3033
$this->$key = $value;
3134
}
3235

33-
public function setStartDate($startDate) {
36+
public function setStartDate($startDate)
37+
{
3438
$this->startDate = $startDate;
3539
$this->apiParas["start_date"] = $startDate;
3640
}
3741

38-
public function getStartDate() {
39-
return $this->startDate;
42+
public function getStartDate()
43+
{
44+
return $this->startDate;
4045
}
4146

4247

43-
public function setEndDate($endDate) {
48+
public function setEndDate($endDate)
49+
{
4450
$this->endDate = $endDate;
4551
$this->apiParas["end_date"] = $endDate;
4652
}
4753

48-
public function getEndDate() {
54+
public function getEndDate()
55+
{
4956
return $this->endDate;
5057
}
5158

52-
public function setOrderState($orderState) {
59+
public function setOrderState($orderState)
60+
{
5361
$this->orderState = $orderState;
5462
$this->apiParas["order_state"] = $orderState;
5563
}
5664

57-
public function getOrderState() {
65+
public function getOrderState()
66+
{
5867
return $this->orderState;
5968
}
6069

61-
public function setOptionalFields($optionalFields) {
70+
public function setOptionalFields($optionalFields)
71+
{
6272
$this->optionalFields = $optionalFields;
6373
$this->apiParas["optional_fields"] = $optionalFields;
6474
}
6575

66-
public function getOptionalFields() {
76+
public function getOptionalFields()
77+
{
6778
return $this->optionalFields;
6879
}
6980

70-
public function setPage($page) {
81+
public function setPage($page)
82+
{
7183
$this->page = $page;
7284
$this->apiParas["page"] = $page;
7385
}
7486

75-
public function getPage() {
87+
public function getPage()
88+
{
7689
return $this->page;
7790
}
7891

79-
public function setPageSize($pageSize){
92+
public function setPageSize($pageSize)
93+
{
8094
$this->pageSize = $pageSize;
8195
$this->apiParas["page_size"] = $pageSize;
8296
}
8397

84-
public function getPageSize(){
85-
return $this->pageSize;
98+
public function getPageSize()
99+
{
100+
return $this->pageSize;
86101
}
87102

88-
public function setSortType($sortType){
103+
public function setSortType($sortType)
104+
{
89105
$this->sortType = $sortType;
90106
$this->apiParas["sortType"] = $sortType;
91107
}
92108

93-
public function getSortType(){
109+
public function getSortType()
110+
{
94111
return $this->sortType;
95112
}
96113

97-
public function setDateType($dateType) {
114+
public function setDateType($dateType)
115+
{
98116
$this->dateType = $dateType;
99117
$this->apiParas["dateType"] = $dateType;
100118
}
101119

102-
public function getDateType() {
120+
public function getDateType()
121+
{
103122
return $this->dateType;
104123
}
105124
}
106-
107-
108-
109-
110-
111-
112-
113-

0 commit comments

Comments
 (0)