Skip to content

微信开放平台,新增使用userstr参数解绑体验者的接口 #1544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,14 @@ public interface WxOpenMaService extends WxMaService {
*/
WxOpenResult unbindTester(String wechatid) throws WxErrorException;

/**
* 解除绑定小程序体验者,其他平台绑定的体验者无法获取到wechatid,可用此方法解绑,详见文档
* https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/Mini_Programs/unbind_tester.html
*
* @param userstr 人员对应的唯一字符串, 可通过获取已绑定的体验者列表获取人员对应的字符串
*/
WxOpenResult unbindTesterByUserstr(String userstr) throws WxErrorException;

/**
* 获得体验者列表
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,20 @@ public WxOpenResult unbindTester(String wechatid) throws WxErrorException {
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
}

/**
* 解除绑定小程序体验者
* @param userstr 人员对应的唯一字符串, 可通过获取已绑定的体验者列表获取人员对应的字符串
* @return
* @throws WxErrorException
*/
@Override
public WxOpenResult unbindTesterByUserstr(String userstr) throws WxErrorException {
JsonObject paramJson = new JsonObject();
paramJson.addProperty("userstr", userstr);
String response = post(API_UNBIND_TESTER, GSON.toJson(paramJson));
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
}

/**
* 获得体验者列表
*
Expand Down