mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🆕 #1416: 企业微信增加获取OA审批模板详情接口
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user