File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
weixin-java-open/src/main/java/me/chanjar/weixin/open/api Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,14 @@ public interface WxOpenMaService extends WxMaService {
295
295
*/
296
296
WxOpenResult unbindTester (String wechatid ) throws WxErrorException ;
297
297
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
+
298
306
/**
299
307
* 获得体验者列表
300
308
*/
Original file line number Diff line number Diff line change @@ -194,6 +194,20 @@ public WxOpenResult unbindTester(String wechatid) throws WxErrorException {
194
194
return WxMaGsonBuilder .create ().fromJson (response , WxOpenResult .class );
195
195
}
196
196
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
+
197
211
/**
198
212
* 获得体验者列表
199
213
*
You can’t perform that action at this time.
0 commit comments