From ae867e83513ee2700b4f5918d8aab081459284c4 Mon Sep 17 00:00:00 2001 From: mayue Date: Mon, 28 Feb 2022 14:36:30 +0800 Subject: [PATCH] * Finish task #49885. --- lib/feishuapi/feishuapi.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/feishuapi/feishuapi.class.php b/lib/feishuapi/feishuapi.class.php index 138c5572f0..d25126517d 100644 --- a/lib/feishuapi/feishuapi.class.php +++ b/lib/feishuapi/feishuapi.class.php @@ -73,7 +73,7 @@ class feishuapi $pageToken = ''; while(true) { - $response = $this->queryAPI($this->apiUrl . "contact/v3/users?department_id={$deptID}" . ($pageToken ? "&page_token={$pageToken}" : ''), '', array(CURLOPT_CUSTOMREQUEST => "GET")); + $response = $this->queryAPI($this->apiUrl . "contact/v3/users?department_id={$deptID}&page_size=50" . ($pageToken ? "&page_token={$pageToken}" : ''), '', array(CURLOPT_CUSTOMREQUEST => "GET")); if(isset($response->data->items)) { foreach($response->data->items as $user) $users[$user->name] = $user->open_id; @@ -164,7 +164,7 @@ class feishuapi $index = 0; while(true) { - $response = $this->queryAPI($this->apiUrl . "contact/v3/departments?parent_department_id=0" . ($pageToken ? "&page_token={$pageToken}" : '') . "&fetch_child=true", '', array(CURLOPT_CUSTOMREQUEST => "GET")); + $response = $this->queryAPI($this->apiUrl . "contact/v3/departments?parent_department_id=0" . ($pageToken ? "&page_token={$pageToken}" : '') . "&fetch_child=true&page_size=50", '', array(CURLOPT_CUSTOMREQUEST => "GET")); if(isset($response->data->items)) { foreach($response->data->items as $key => $dept)