1
0
mirror of synced 2026-02-18 11:17:49 +08:00

:new:【企业微信】 新增获取成员假期余额的接口

This commit is contained in:
Wong
2022-04-13 06:44:20 +00:00
committed by binarywang
parent 8bcafdc6b2
commit b00e938ef7
5 changed files with 99 additions and 0 deletions

View File

@@ -170,7 +170,9 @@ public class WxCpOaServiceImplTest {
}
/**
* 获取企业假期管理配置
* https://developer.work.weixin.qq.com/document/path/93375
*
* @throws WxErrorException
*/
@Test
@@ -179,4 +181,21 @@ public class WxCpOaServiceImplTest {
log.info(corpConf.toJson());
}
/**
* 获取成员假期余额
* https://developer.work.weixin.qq.com/document/path/93376
*
* @throws WxErrorException
*/
@Test
public void testGetUserVacationQuota() throws WxErrorException{
WxCpUserVacationQuota vacationQuota = this.wxService.getOaService().getUserVacationQuota("WangKai");
log.info(vacationQuota.toJson());
String text = "{\"errcode\":0,\"errmsg\":\"ok\",\"lists\":[{\"id\":1,\"assignduration\":0,\"usedduration\":0,\"leftduration\":604800,\"vacationname\":\"年假\"},{\"id\":2,\"assignduration\":0,\"usedduration\":0,\"leftduration\":1296000,\"vacationname\":\"事假\"},{\"id\":3,\"assignduration\":0,\"usedduration\":0,\"leftduration\":0,\"vacationname\":\"病假\"}]}";
WxCpUserVacationQuota json = WxCpUserVacationQuota.fromJson(text);
log.info("数据为:{}", json.toJson());
}
}