use of com.jeecg.dingtalk.api.user.body.GetUserListBody in project kms by mahonelau.
the class ThirdAppDingtalkServiceImpl method getUserListByDeptIdRecursion.
/**
* 递归查询所有用户
*/
private void getUserListByDeptIdRecursion(int deptId, int cursor, List<User> userList, String accessToken) {
// 根据钉钉部门查询所有钉钉用户,用于反向同步到本地
GetUserListBody getUserListBody = new GetUserListBody(deptId, cursor, 100);
Response<PageResult<User>> response = JdtUserAPI.getUserListByDeptId(getUserListBody, accessToken);
if (response.isSuccess()) {
PageResult<User> page = response.getResult();
userList.addAll(page.getList());
if (page.getHas_more()) {
this.getUserListByDeptIdRecursion(deptId, page.getNext_cursor(), userList, accessToken);
}
}
}
use of com.jeecg.dingtalk.api.user.body.GetUserListBody in project kykms by mahonelau.
the class ThirdAppDingtalkServiceImpl method getUserListByDeptIdRecursion.
/**
* 递归查询所有用户
*/
private void getUserListByDeptIdRecursion(int deptId, int cursor, List<User> userList, String accessToken) {
// 根据钉钉部门查询所有钉钉用户,用于反向同步到本地
GetUserListBody getUserListBody = new GetUserListBody(deptId, cursor, 100);
Response<PageResult<User>> response = JdtUserAPI.getUserListByDeptId(getUserListBody, accessToken);
if (response.isSuccess()) {
PageResult<User> page = response.getResult();
userList.addAll(page.getList());
if (page.getHas_more()) {
this.getUserListByDeptIdRecursion(deptId, page.getNext_cursor(), userList, accessToken);
}
}
}
use of com.jeecg.dingtalk.api.user.body.GetUserListBody in project jeecg-boot by jeecgboot.
the class ThirdAppDingtalkServiceImpl method getUserListByDeptIdRecursion.
/**
* 递归查询所有用户
*/
private void getUserListByDeptIdRecursion(int deptId, int cursor, List<User> userList, String accessToken) {
// 根据钉钉部门查询所有钉钉用户,用于反向同步到本地
GetUserListBody getUserListBody = new GetUserListBody(deptId, cursor, 100);
Response<PageResult<User>> response = JdtUserAPI.getUserListByDeptId(getUserListBody, accessToken);
if (response.isSuccess()) {
PageResult<User> page = response.getResult();
userList.addAll(page.getList());
if (page.getHas_more()) {
this.getUserListByDeptIdRecursion(deptId, page.getNext_cursor(), userList, accessToken);
}
}
}
Aggregations