|
@@ -57,12 +57,11 @@ class Login extends Base
|
|
|
public function get_son_department($parent_id){
|
|
|
$c = $this->get_obj()['obj'];
|
|
|
$req = new \OapiV2DepartmentListsubRequest;
|
|
|
- echo $parent_id;exit();
|
|
|
$req->setDeptId($parent_id);
|
|
|
$resp = $c->execute($req, $this->get_obj()['access_token'], "https://oapi.dingtalk.com/topapi/v2/department/listsubid");
|
|
|
$dept_id_list = array();
|
|
|
if(isset($resp->result) && $resp->result){
|
|
|
- $resp->result->dept_id_list;
|
|
|
+ $dept_id_list = $resp->result->dept_id_list;
|
|
|
}
|
|
|
return $dept_id_list;
|
|
|
}
|