mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
pull request (#163)
* 新增两个接口:获取设备绑定的用户、获取用户绑定的设备 * update * 申请设备二维码接口的返回格式有变动,做出相应更改。
This commit is contained in:
@@ -38,23 +38,25 @@ public class BaseResp extends AbstractDeviceBean{
|
||||
}
|
||||
|
||||
private class BaseInfo {
|
||||
private String device_type;
|
||||
private String device_id;
|
||||
@SerializedName("device_type")
|
||||
private String deviceType;
|
||||
@SerializedName("device_id")
|
||||
private String deviceId;
|
||||
|
||||
public String getDevice_type() {
|
||||
return device_type;
|
||||
public String getDeviceType() {
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setDevice_type(String device_type) {
|
||||
this.device_type = device_type;
|
||||
public void setDeviceType(String deviceType) {
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getDevice_id() {
|
||||
return device_id;
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDevice_id(String device_id) {
|
||||
this.device_id = device_id;
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by keungtung on 16/12/2016.
|
||||
*/
|
||||
public class WxDeviceBindDeviceResult extends AbstractDeviceBean {
|
||||
@SerializedName("resp_msg")
|
||||
private RespMsg respMsg;
|
||||
@SerializedName("openid")
|
||||
private String openId;
|
||||
@SerializedName("device_list")
|
||||
private List<Device> devices;
|
||||
|
||||
public static WxDeviceBindDeviceResult fromJson(String json) {
|
||||
return WxMpGsonBuilder.create().fromJson(json, WxDeviceBindDeviceResult.class);
|
||||
}
|
||||
|
||||
private class Device {
|
||||
@SerializedName("device_type")
|
||||
private String deviceType;
|
||||
@SerializedName("device_id")
|
||||
private String deviceId;
|
||||
|
||||
public String getDeviceType() {
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setDeviceType(String deviceType) {
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by keungtung on 16/12/2016.
|
||||
*/
|
||||
public class WxDeviceOpenIdResult extends AbstractDeviceBean {
|
||||
@SerializedName("errcode")
|
||||
private Integer errCode;
|
||||
@SerializedName("errmsg")
|
||||
private String errMsg;
|
||||
@SerializedName("open_id")
|
||||
private List<String> openIds;
|
||||
@SerializedName("resp_msg")
|
||||
private RespMsg respMsg;
|
||||
|
||||
public static WxDeviceOpenIdResult fromJson(String json) {
|
||||
return WxMpGsonBuilder.create().fromJson(json, WxDeviceOpenIdResult.class);
|
||||
}
|
||||
|
||||
public Integer getErrCode() {
|
||||
return errCode;
|
||||
}
|
||||
|
||||
public void setErrCode(Integer errCode) {
|
||||
this.errCode = errCode;
|
||||
}
|
||||
|
||||
public String getErrMsg() {
|
||||
return errMsg;
|
||||
}
|
||||
|
||||
public void setErrMsg(String errMsg) {
|
||||
this.errMsg = errMsg;
|
||||
}
|
||||
|
||||
public List<String> getOpenIds() {
|
||||
return openIds;
|
||||
}
|
||||
|
||||
public void setOpenIds(List<String> openIds) {
|
||||
this.openIds = openIds;
|
||||
}
|
||||
|
||||
public RespMsg getRespMsg() {
|
||||
return respMsg;
|
||||
}
|
||||
|
||||
public void setRespMsg(RespMsg respMsg) {
|
||||
this.respMsg = respMsg;
|
||||
}
|
||||
}
|
||||
@@ -6,15 +6,15 @@ import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
/**
|
||||
* Created by keungtung on 10/12/2016.
|
||||
*/
|
||||
public class WxDeviceQrCodeResult extends AbstractDeviceBean{
|
||||
public class WxDeviceQrCodeResult extends AbstractDeviceBean {
|
||||
@SerializedName("deviceid")
|
||||
private String deviceId;
|
||||
@SerializedName("qrticket")
|
||||
private String qrTicket;
|
||||
@SerializedName("devicelicence")
|
||||
private String deviceLicence;
|
||||
@SerializedName("resp_msg")
|
||||
private RespMsg respMsg;
|
||||
@SerializedName("base_resp")
|
||||
private BaseResp baseResp;
|
||||
|
||||
public static WxDeviceQrCodeResult fromJson(String json) {
|
||||
return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxDeviceQrCodeResult.class);
|
||||
@@ -28,12 +28,12 @@ public class WxDeviceQrCodeResult extends AbstractDeviceBean{
|
||||
this.deviceLicence = deviceLicence;
|
||||
}
|
||||
|
||||
public RespMsg getRespMsg() {
|
||||
return respMsg;
|
||||
public BaseResp getBaseResp() {
|
||||
return baseResp;
|
||||
}
|
||||
|
||||
public void setRespMsg(RespMsg respMsg) {
|
||||
this.respMsg = respMsg;
|
||||
public void setBaseResp(BaseResp baseResp) {
|
||||
this.baseResp = baseResp;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
|
||||
Reference in New Issue
Block a user