10000 :new: #1544 微信开放平台新增使用userstr参数解绑体验者的接口 · binarywang/WxJava@eb38e86 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb38e86

Browse files
authored
🆕 #1544 微信开放平台新增使用userstr参数解绑体验者的接口
1 parent 98aef34 commit eb38e86

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenMaService.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,14 @@ public interface WxOpenMaService extends WxMaService {
295295
*/
296296
WxOpenResult unbindTester(String wechatid) throws WxErrorException;
297297

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

weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMaServiceImpl.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,20 @@ public WxOpenResult unbindTester(String wechatid) throws WxErrorException {
194194
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
195195
}
196196

197+
/**
198+
* 解除绑定小程序体验者
199+
* @param userstr 人员对应的唯一字符串, 可通过获取已绑定的体验者列表获取人员对应的字符串
200+
* @return
201+
* @throws WxErrorException
202+
*/
203+
@Override
204+
public WxOpenResult unbindTesterByUserstr(String userstr) throws WxErrorException {
205+
JsonObject paramJson = new JsonObject();
206+
paramJson.addProperty("userstr", userstr);
207+
String response = post(API_UNBIND_TESTER, GSON.toJson(paramJson));
208+
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
209+
}
210+
197211
/**
198212
* 获得体验者列表
199213
*

0 commit comments

Comments
 (0)
0