🆕 #3164 【企业微信】增加停止发表企业朋友圈的接口
This commit is contained in:
@@ -847,6 +847,20 @@ public interface WxCpExternalContactService {
|
||||
*/
|
||||
WxCpGetMomentTaskResult getMomentTaskResult(String jobId) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 停止发表企业朋友圈。
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/97612">文档地址</a>
|
||||
* </pre>
|
||||
*
|
||||
* @param momentId 朋友圈id,可通过<a href="https://developer.work.weixin.qq.com/document/path/97612#25254/%E8%8E%B7%E5%8F%96%E5%AE%A2%E6%88%B7%E6%9C%8B%E5%8F%8B%E5%9C%88%E4%BC%81%E4%B8%9A%E5%8F%91%E8%A1%A8%E7%9A%84%E5%88%97%E8%A1%A8">获取客户朋友圈企业发表的列表</a>接口获取朋友圈企业发表的列表
|
||||
* @return wx cp add moment result
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpBaseResp cancelMomentTask(String momentId) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取客户朋友圈全部的发表记录 获取企业全部的发表列表
|
||||
|
||||
@@ -530,6 +530,14 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
return WxCpGetMomentTaskResult.fromJson(this.mainService.get(url, params));
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp cancelMomentTask(String momentId) throws WxErrorException {
|
||||
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(CANCEL_MOMENT_TASK);
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("moment_id", momentId);
|
||||
return WxCpBaseResp.fromJson(this.mainService.post(url, json.toString()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpGetMomentList getMomentList(Long startTime, Long endTime, String creator, Integer filterType,
|
||||
String cursor, Integer limit) throws WxErrorException {
|
||||
|
||||
@@ -1233,6 +1233,12 @@ public interface WxCpApiPathConsts {
|
||||
* The constant GET_MOMENT_TASK_RESULT.
|
||||
*/
|
||||
String GET_MOMENT_TASK_RESULT = "/cgi-bin/externalcontact/get_moment_task_result";
|
||||
|
||||
/**
|
||||
* 停止发表企业朋友圈
|
||||
*/
|
||||
String CANCEL_MOMENT_TASK = "/cgi-bin/externalcontact/cancel_moment_task";
|
||||
|
||||
/**
|
||||
* The constant GET_MOMENT_LIST.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user