public class JdtDepartmentAPI extends Object
| 构造器和说明 |
|---|
JdtDepartmentAPI() |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<Response<com.alibaba.fastjson.JSONObject>> |
batchDeletePseudo(Collection<Integer> deptIds,
String accessToken)
伪批量删除部门(for循环调接口)
|
static Response<Integer> |
create(Department department,
String accessToken)
创建部门
https://developers.dingtalk.com/document/app/create-a-department-v2 |
static Response<com.alibaba.fastjson.JSONObject> |
delete(int dept_id,
String accessToken)
根据部门ID删除指定部门
https://developers.dingtalk.com/document/app/delete-a-department-v2 |
static Response<Department> |
getDepartmentById(int dept_id,
String accessToken)
根据dept_id获取部门详情
https://developers.dingtalk.com/document/app/query-department-details0-v2 |
static Response<List<Integer>> |
getListParentByDept(String dept_id,
String accessToken)
获取指定部门的所有父部门列表
https://developers.dingtalk.com/document/app/query-the-list-of-all-parent-departments-of-a-department |
static Response<List<DeptParentResponse>> |
getListParentByUser(String userid,
String accessToken)
获取指定用户的所有父部门列表
https://developers.dingtalk.com/document/app/queries-the-list-of-all-parent-departments-of-a-user |
static Response<List<Integer>> |
getListSubId(int dept_id,
String accessToken)
获取子部门ID列表
https://developers.dingtalk.com/document/app/obtain-a-sub-department-id-list-v2 |
static List<Department> |
listAll(String accessToken)
非官方API接口:获取钉钉的所有部门,平铺返回,不关心失败情况
|
static List<Response<Department>> |
listAllResponse(String accessToken)
非官方API接口:获取钉钉的所有部门,平铺返回,返回失败结果
|
static Response<List<Department>> |
listByParentId(int dept_id,
String accessToken)
根据父ID获取子部门列表(不包含子部门的子部门)
https://developers.dingtalk.com/document/app/obtain-the-department-list-v2 |
static Response<List<Department>> |
listByRoot(String accessToken)
获取根部门下的子部门列表(不包含子部门的子部门)
https://developers.dingtalk.com/document/app/obtain-the-department-list-v2 |
static Response<com.alibaba.fastjson.JSONObject> |
update(Department department,
String accessToken)
更新部门信息
https://developers.dingtalk.com/document/app/update-a-department-v2 |
public static Response<Integer> create(Department department, String accessToken)
department - 部门实例accessToken - 有效的access_tokenpublic static Response<com.alibaba.fastjson.JSONObject> update(Department department, String accessToken)
department - 部门实例accessToken - 有效的access_tokenpublic static Response<com.alibaba.fastjson.JSONObject> delete(int dept_id, String accessToken)
dept_id - 部门idaccessToken - 有效的access_tokenpublic static List<Response<com.alibaba.fastjson.JSONObject>> batchDeletePseudo(Collection<Integer> deptIds, String accessToken)
deptIds - 部门ID列表accessToken - 有效的access_tokenpublic static Response<List<Department>> listByRoot(String accessToken)
accessToken - 有效的access_tokenpublic static Response<List<Department>> listByParentId(int dept_id, String accessToken)
dept_id - 父部门IDaccessToken - 有效的access_tokenpublic static Response<Department> getDepartmentById(int dept_id, String accessToken)
dept_id - 部门idaccessToken - 有效的access_tokenpublic static Response<List<Integer>> getListSubId(int dept_id, String accessToken)
dept_id - 部门idaccessToken - 有效的access_tokenpublic static Response<List<DeptParentResponse>> getListParentByUser(String userid, String accessToken)
userid - 用户idaccessToken - 有效的access_tokenpublic static Response<List<Integer>> getListParentByDept(String dept_id, String accessToken)
dept_id - 部门idaccessToken - 有效的access_tokenpublic static List<Department> listAll(String accessToken)
accessToken - 有效的access_tokenpublic static List<Response<Department>> listAllResponse(String accessToken)
accessToken - 有效的access_tokenCopyright © 2022. All rights reserved.