🐛 #1181 修复小程序绑定体验者返回结果

This commit is contained in:
S 2019-08-28 16:57:24 +08:00 committed by Binary Wang
parent b45f20a856
commit 2eb0aa574c
3 changed files with 26 additions and 3 deletions

View File

@ -253,7 +253,7 @@ public interface WxOpenMaService extends WxMaService {
* @return
* @throws WxErrorException
*/
WxOpenResult bindTester(String wechatid) throws WxErrorException;
WxOpenMaBindTesterResult bindTester(String wechatid) throws WxErrorException;
/**
* 解除绑定小程序体验者

View File

@ -172,11 +172,11 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
* @throws WxErrorException
*/
@Override
public WxOpenResult bindTester(String wechatid) throws WxErrorException {
public WxOpenMaBindTesterResult bindTester(String wechatid) throws WxErrorException {
JsonObject paramJson = new JsonObject();
paramJson.addProperty("wechatid", wechatid);
String response = post(API_BIND_TESTER, GSON.toJson(paramJson));
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
return WxMaGsonBuilder.create().fromJson(response, WxOpenMaBindTesterResult.class);
}
/**

View File

@ -0,0 +1,23 @@
package me.chanjar.weixin.open.bean.result;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
@Data
@EqualsAndHashCode(callSuper = true)
public class WxOpenMaBindTesterResult extends WxOpenResult {
private static final long serialVersionUID = -730133894662203011L;
@SerializedName("userstr")
private String userstr;
@Override
public String toString() {
return WxOpenGsonBuilder.create().toJson(this);
}
}