|
@@ -76,10 +76,6 @@ class DingtalkService
|
|
|
$req->setCursor("0");
|
|
|
$req->setSize("100");
|
|
|
$resp = $c->execute($req, $accessToken, "https://oapi.dingtalk.com/topapi/v2/user/list");
|
|
|
- p($resp['errcode']);
|
|
|
- p($resp['errmsg']);
|
|
|
- p($resp['result']);
|
|
|
- exit;
|
|
|
if ($resp->errcode == 0 && $resp->errmsg == 'ok') {
|
|
|
$result = $resp->result;
|
|
|
return $result;
|
|
@@ -156,10 +152,8 @@ class DingtalkService
|
|
|
public static function renew()
|
|
|
{
|
|
|
$res = self::user_list(500773946);
|
|
|
- p($res['errcode']);
|
|
|
- p($res['errmsg']);
|
|
|
- p($res['result']);
|
|
|
- p($res['result']);
|
|
|
+ p($res->list);
|
|
|
+ p($res);
|
|
|
exit;
|
|
|
|
|
|
// 更新部门
|
|
@@ -183,7 +177,10 @@ class DingtalkService
|
|
|
$add_department_data[] = $value;
|
|
|
}
|
|
|
|
|
|
- $user_data[] = self::user_list($value['dept_id']);
|
|
|
+ $user_list = self::user_list($value['dept_id']);
|
|
|
+ if($user_list->has_more){
|
|
|
+ $user_data[] = $user_list->list;
|
|
|
+ }
|
|
|
}
|
|
|
p($user_data);
|
|
|
p(json_encode($user_data,JSON_UNESCAPED_UNICODE));
|