


public void departmentListSub() throws ApiException {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/department/listsub");
OapiV2DepartmentListsubRequest req = new OapiV2DepartmentListsubRequest();
req.setDeptId(1L);
req.setLanguage("zh_CN");
OapiV2DepartmentListsubResponse rsp = client.execute(req, "access_token");
System.out.println(rsp.getBody());
}public void userListsimple() throws ApiException {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/user/listsimple");
OapiUserListsimpleRequest req = new OapiUserListsimpleRequest();
req.setDeptId(12345L);
req.setCursor(0L);
req.setSize(100L);
req.setOrderField("modify_desc");
req.setContainAccessLimit(false);
req.setLanguage("zh_CN");
OapiUserListsimpleResponse rsp = client.execute(req, "access_token");
System.out.println(rsp.getBody());
}public void stepInfoGetUserStatus() throws ApiException {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/health/stepinfo/getuserstatus");
OapiHealthStepinfoGetuserstatusRequest req = new OapiHealthStepinfoGetuserstatusRequest();
req.setUserid("452523****041");
OapiHealthStepinfoGetuserstatusResponse rsp = client.execute(req, "access_token");
System.out.println(rsp.getBody());
}public void stepInfoListByUserId() throws ApiException {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/health/stepinfo/listbyuserid");
OapiHealthStepinfoListbyuseridRequest req = new OapiHealthStepinfoListbyuseridRequest();
req.setUserids("452523****041,001");
req.setStatDate("20221104");
OapiHealthStepinfoListbyuseridResponse rsp = client.execute(req, "access_token");
System.out.println(rsp.getBody());
}
