🆕 #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

@@ -124,4 +124,12 @@ public interface WxCpOaService {
List<WxCpDialRecord> getDialRecord(Date startTime, Date endTime, Integer offset,
Integer limit) throws WxErrorException;
/**
* 获取审批模板详情
* @param templateId 模板ID
* @return
* @throws WxErrorException
*/
WxCpTemplateResult getTemplateDetail(@NonNull String templateId)throws WxErrorException;
}

View File

@@ -209,4 +209,13 @@ public class WxCpOaServiceImpl implements WxCpOaService {
}.getType()
);
}
@Override
public WxCpTemplateResult getTemplateDetail(@NonNull String templateId) throws WxErrorException {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("template_id",templateId);
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(GET_TEMPLATE_DETAIL);
String responseContent = this.mainService.post(url, jsonObject.toString());
return WxCpGsonBuilder.create().fromJson(responseContent,WxCpTemplateResult.class);
}
}