Selaa lähdekoodia

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

dev1
杜神 4 vuotta sitten
committed by GitHub
vanhempi
commit
eb38e86a78
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 muutettua tiedostoa jossa 22 lisäystä ja 0 poistoa
  1. +8
    -0
      weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenMaService.java
  2. +14
    -0
      weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMaServiceImpl.java

+ 8
- 0
weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenMaService.java Näytä tiedosto

@@ -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;

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


+ 14
- 0
weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMaServiceImpl.java Näytä tiedosto

@@ -194,6 +194,20 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
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);
}

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


Ladataan…
Peruuta
Tallenna