1
0
mirror of synced 2025-12-24 02:57:55 +08:00

🆕 #1416: 企业微信增加获取OA审批模板详情接口

This commit is contained in:
Gyv12345
2020-02-27 16:40:44 +08:00
committed by GitHub
parent 6aa8559970
commit bb0771736f
21 changed files with 386 additions and 7 deletions

View File

@@ -5,10 +5,7 @@ import com.google.inject.Inject;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.api.ApiTestModule;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.oa.WxCpApprovalDetailResult;
import me.chanjar.weixin.cp.bean.oa.WxCpApprovalInfo;
import me.chanjar.weixin.cp.bean.oa.WxCpCheckinData;
import me.chanjar.weixin.cp.bean.oa.WxCpCheckinOption;
import me.chanjar.weixin.cp.bean.oa.*;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -62,8 +59,8 @@ public class WxCpOaServiceImplTest {
@Test
public void testGetApprovalInfo() throws WxErrorException, ParseException {
Date startTime = DateFormatUtils.ISO_8601_EXTENDED_DATE_FORMAT.parse("2019-04-11");
Date endTime = DateFormatUtils.ISO_8601_EXTENDED_DATE_FORMAT.parse("2019-05-10");
Date startTime = DateFormatUtils.ISO_8601_EXTENDED_DATE_FORMAT.parse("2019-12-01");
Date endTime = DateFormatUtils.ISO_8601_EXTENDED_DATE_FORMAT.parse("2019-12-31");
WxCpApprovalInfo result = wxService.getOAService().getApprovalInfo(startTime, endTime);
assertThat(result).isNotNull();
@@ -74,7 +71,7 @@ public class WxCpOaServiceImplTest {
@Test
public void testGetApprovalDetail() throws WxErrorException {
String spNo = "201909270001";
String spNo = "201912020001";
WxCpApprovalDetailResult result = wxService.getOAService().getApprovalDetail(spNo);
assertThat(result).isNotNull();
@@ -83,4 +80,13 @@ public class WxCpOaServiceImplTest {
System.out.println(gson.toJson(result));
}
@Test
public void testGetTemplateDetail() throws WxErrorException{
String templateId="3TkZjxugodbqpEMk9j7X6h6zKqYkc7MxQrrFmT7H";
WxCpTemplateResult result=wxService.getOAService().getTemplateDetail(templateId);
assertThat(result).isNotNull();
System.out.println("result ");
System.out.println(gson.toJson(result));
}
}