Commit dfa663ca28e1fe2f341bf59b621b962e290c9f49
1 parent
df4997cd
调整接口请求参数
Showing
2 changed files
with
16 additions
and
13 deletions
src/Api/Department.php
... | ... | @@ -69,10 +69,10 @@ class Department |
69 | 69 | public function branchList(array $params) : array |
70 | 70 | { |
71 | 71 | $params = array_merge([ |
72 | - 'orgUnitZH' => '', | |
73 | - 'buFunctionZH' => '', | |
74 | - 'departmentZH' => '', | |
75 | - 'teamZH' => '' | |
72 | + //'orgUnitZH' => '', | |
73 | + //'buFunctionZH' => '', | |
74 | + //'departmentZH' => '', | |
75 | + //'teamZH' => '' | |
76 | 76 | ], $params); |
77 | 77 | |
78 | 78 | $result = $this->service->apiRequest('get', 'branchList', $params); |
... | ... | @@ -98,10 +98,10 @@ class Department |
98 | 98 | public function branchAddOrUpdate(array $params) : array |
99 | 99 | { |
100 | 100 | $params = array_merge([ |
101 | - 'branchNo' => '', | |
102 | - 'parentBranchNo' => '', | |
103 | - 'nameZH' => '', | |
104 | - 'nameEN' => '', | |
101 | + //'branchNo' => '', | |
102 | + //'parentBranchNo' => '', | |
103 | + //'nameZH' => '', | |
104 | + //'nameEN' => '', | |
105 | 105 | 'deleted' => self::DELETE_NO |
106 | 106 | ], $params); |
107 | 107 | if ($params['parentBranchNo'] === '') { | ... | ... |
src/Api/User.php
... | ... | @@ -37,11 +37,14 @@ class User |
37 | 37 | */ |
38 | 38 | public function baseList(array $params) : array |
39 | 39 | { |
40 | - $params = array_merge([ | |
41 | - 'nameZH' => '', | |
42 | - 'nameEN' => '', | |
43 | - 'email' => '' | |
44 | - ], $params); | |
40 | + if (empty($params)) { | |
41 | + $params = array_merge([ | |
42 | + 'nameZH' => '', | |
43 | + 'nameEN' => '', | |
44 | + //'email' => '' | |
45 | + ], $params); | |
46 | + $params = []; | |
47 | + } | |
45 | 48 | |
46 | 49 | $result = $this->service->apiRequest('get', 'employeeList', $params); |
47 | 50 | return isset($result['employeeList']) ? $result['employeeList'] : (isset($result['data']) ? $result['data'] : []); | ... | ... |