Skip to content

Commit

Permalink
🆕 #3164 【企业微信】增加停止发表企业朋友圈的接口
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongjun96 authored Mar 14, 2024
1 parent 5977567 commit 371a59d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,20 @@ WxCpUserExternalGroupChatStatistic getGroupChatStatistic(Date startTime, Integer
*/
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>
* 获取客户朋友圈全部的发表记录 获取企业全部的发表列表
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,14 @@ public WxCpGetMomentTaskResult getMomentTaskResult(String jobId) throws WxErrorE
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,12 @@ interface ExternalContact {
* 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.
*/
Expand Down

3 comments on commit 371a59d

@ParkFeng
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi,这块代码什么时候合并到正式版本中哈

@binarywang
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前你可以使用最新测试版本

@ParkFeng
Copy link

@ParkFeng ParkFeng commented on 371a59d Aug 7, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.