mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-05 21:27:47 +08:00
增加查看通讯录全量更新结果的接口
This commit is contained in:
parent
57acfd5330
commit
afaa0a3bde
@ -562,12 +562,20 @@ public interface WxCpService {
|
||||
* @param mediaId
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
void replaceParty(String mediaId) throws WxErrorException;
|
||||
String replaceParty(String mediaId) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 上传用户列表覆盖企业号上的用户信息
|
||||
* @param mediaId
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
void replaceUser(String mediaId) throws WxErrorException;
|
||||
String replaceUser(String mediaId) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取异步任务结果
|
||||
* @param joinId
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*/
|
||||
String getTaskResult(String joinId) throws WxErrorException;
|
||||
}
|
||||
|
@ -656,19 +656,25 @@ public class WxCpServiceImpl implements WxCpService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replaceParty(String mediaId) throws WxErrorException {
|
||||
public String replaceParty(String mediaId) throws WxErrorException {
|
||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/batch/replaceparty";
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
jsonObject.addProperty("media_id", mediaId);
|
||||
post(url, jsonObject.toString());
|
||||
return post(url, jsonObject.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replaceUser(String mediaId) throws WxErrorException {
|
||||
public String replaceUser(String mediaId) throws WxErrorException {
|
||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/batch/replaceuser";
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
jsonObject.addProperty("media_id", mediaId);
|
||||
post(url, jsonObject.toString());
|
||||
return post(url, jsonObject.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTaskResult(String joinId) throws WxErrorException {
|
||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/batch/getresult?jobid="+joinId;
|
||||
return get(url, null);
|
||||
}
|
||||
|
||||
public File getTmpDirFile() {
|
||||
|
Loading…
Reference in New Issue
Block a user