Commit 3f5e6512 authored by pengfei's avatar pengfei

update wx group chat

parent 69d3593f
...@@ -18,7 +18,6 @@ class GroupChatService ...@@ -18,7 +18,6 @@ class GroupChatService
{ {
public $wxApp; public $wxApp;
public $pageSize = 100; public $pageSize = 100;
public $nextCursor = '';
public $ownerUserIds = []; public $ownerUserIds = [];
public $departmentId; // 部门id public $departmentId; // 部门id
...@@ -40,8 +39,9 @@ class GroupChatService ...@@ -40,8 +39,9 @@ class GroupChatService
*/ */
public function process() public function process()
{ {
$nextCursor = ''; // 下一页游标,首次为空,请求接口会返回
while (true) { while (true) {
$result = $this->getGroupChatList($this->nextCursor); $result = $this->getGroupChatList($nextCursor);
if (empty($result['group_chat_list'])) { if (empty($result['group_chat_list'])) {
break; break;
} }
...@@ -62,7 +62,7 @@ class GroupChatService ...@@ -62,7 +62,7 @@ class GroupChatService
if (empty($result['next_cursor'])) { if (empty($result['next_cursor'])) {
break; break;
} }
$this->nextCursor = $result['next_cursor']; $nextCursor = $result['next_cursor'];
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment