Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'develop' into develop
  • Loading branch information
binarywang authored Oct 31, 2021
commit 2df9bfbdbb2164a23cbd1f2695f7d89fa4e180a5
Original file line number Diff line number Diff line change
Expand Up @@ -559,4 +559,85 @@ public WxCpGetMomentComments getMomentComments(String momentId, String userId)
return WxCpGetMomentComments.fromJson(result);
}

/**
* <pre>
* 企业和第三方应用可通过此接口获取企业与成员的群发记录。
* https://work.weixin.qq.com/api/doc/90000/90135/93338
* </pre>
*
* @param chatType 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
* @param startTime 群发任务记录开始时间
* @param endTime 群发任务记录结束时间
* @param creator 群发任务创建人企业账号id
* @param filterType 创建人类型。0:企业发表 1:个人发表 2:所有,包括个人创建以及企业创建,默认情况下为所有类型
* @param limit 返回的最大记录数,整型,最大值100,默认值50,超过最大值时取默认值
* @param cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
* @return wx cp base resp
* @throws WxErrorException the wx error exception
*/
@Override
public WxCpGroupMsgListResult getGroupMsgListV2(String chatType, @NonNull Date startTime, @NonNull Date endTime, String creator, Integer filterType, Integer limit, String cursor) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("chat_type", chatType);
json.addProperty("start_time", startTime.getTime() / 1000);
json.addProperty("end_time", endTime.getTime() / 1000);
json.addProperty("creator", creator);
json.addProperty("filter_type", filterType);
json.addProperty("limit", limit);
json.addProperty("cursor", cursor);

final String url = this.mainService.getWxCpConfigStorage().getApiUrl(GET_GROUP_MSG_SEND_RESULT);
final String result = this.mainService.post(url, json.toString());
return WxCpGroupMsgListResult.fromJson(result);
}

/**
* <pre>
* 企业和第三方应用可通过此接口获取企业与成员的群发记录。
* https://work.weixin.qq.com/api/doc/90000/90135/93338#获取企业群发成员执行结果
* </pre>
*
* @param msgid 群发消息的id,通过获取群发记录列表接口返回
* @param userid 发送成员userid,通过获取群发成员发送任务列表接口返回
* @param limit 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值
* @param cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
* @return wx cp base resp
* @throws WxErrorException the wx error exception
*/
@Override
public WxCpGroupMsgSendResult getGroupMsgSendResult(String msgid, String userid, Integer limit, String cursor) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("msgid", msgid);
json.addProperty("userid", userid);
json.addProperty("limit", limit);
json.addProperty("cursor", cursor);

final String url = this.mainService.getWxCpConfigStorage().getApiUrl(GET_GROUP_MSG_SEND_RESULT);
final String result = this.mainService.post(url, json.toString());
return WxCpGroupMsgSendResult.fromJson(result);
}

/**
* <pre>
* 获取群发成员发送任务列表。
* https://work.weixin.qq.com/api/doc/90000/90135/93338#获取群发成员发送任务列表
* </pre>
*
* @param msgid 群发消息的id,通过获取群发记录列表接口返回
* @param limit 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值
* @param cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
* @return wx cp base resp
* @throws WxErrorException the wx error exception
*/
@Override
public WxCpGroupMsgTaskResult getGroupMsgTask(String msgid, Integer limit, String cursor) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("msgid", msgid);
json.addProperty("limit", limit);
json.addProperty("cursor", cursor);

final String url = this.mainService.getWxCpConfigStorage().getApiUrl(GET_GROUP_MSG_SEND_RESULT);
final String result = this.mainService.post(url, json.toString());
return WxCpGroupMsgTaskResult.fromJson(result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,5 +213,10 @@ interface ExternalContact {
String GET_MOMENT_CUSTOMER_LIST = "/cgi-bin/externalcontact/get_moment_customer_list";
String GET_MOMENT_SEND_RESULT = "/cgi-bin/externalcontact/get_moment_send_result";
String GET_MOMENT_COMMENTS = "/cgi-bin/externalcontact/get_moment_comments";

String GET_GROUP_MSG_SEND_RESULT = "/cgi-bin/externalcontact/get_groupmsg_send_result";
String GET_GROUP_MSG_TASK = "/cgi-bin/externalcontact/get_groupmsg_task";
String GET_GROUP_MSG_LIST_V2 = "/cgi-bin/externalcontact/get_groupmsg_list_v2";

}
}
You are viewing a condensed version of this merge commit. You can view the full changes here.