mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-11-04 06:07:59 +08:00 
			
		
		
		
	增加查看通讯录全量更新结果的接口
This commit is contained in:
		@ -562,12 +562,20 @@ public interface WxCpService {
 | 
				
			|||||||
   * @param mediaId
 | 
					   * @param mediaId
 | 
				
			||||||
   * @throws WxErrorException
 | 
					   * @throws WxErrorException
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  void replaceParty(String mediaId) throws WxErrorException;
 | 
					  String replaceParty(String mediaId) throws WxErrorException;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * 上传用户列表覆盖企业号上的用户信息
 | 
					   * 上传用户列表覆盖企业号上的用户信息
 | 
				
			||||||
   * @param mediaId
 | 
					   * @param mediaId
 | 
				
			||||||
   * @throws WxErrorException
 | 
					   * @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
 | 
					  @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";
 | 
						  String url = "https://qyapi.weixin.qq.com/cgi-bin/batch/replaceparty";
 | 
				
			||||||
	  JsonObject jsonObject = new JsonObject();
 | 
						  JsonObject jsonObject = new JsonObject();
 | 
				
			||||||
	  jsonObject.addProperty("media_id", mediaId);
 | 
						  jsonObject.addProperty("media_id", mediaId);
 | 
				
			||||||
	  post(url, jsonObject.toString());
 | 
						  return post(url, jsonObject.toString());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Override
 | 
					  @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";
 | 
						  String url = "https://qyapi.weixin.qq.com/cgi-bin/batch/replaceuser";
 | 
				
			||||||
	  JsonObject jsonObject = new JsonObject();
 | 
						  JsonObject jsonObject = new JsonObject();
 | 
				
			||||||
	  jsonObject.addProperty("media_id", mediaId);
 | 
						  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() {
 | 
					  public File getTmpDirFile() {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user