Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
package me.chanjar.weixin.mp.bean.device;

import com.google.gson.annotations.SerializedName;

/**
* Created by keungtung on 10/12/2016.
*/
public class BaseResp extends AbstractDeviceBean{
private BaseInfo base_info;
private Integer errcode;
private String errmsg;

public Integer getErrcode() {
return errcode;
@SerializedName("base_info")
private BaseInfo baseInfo;
@SerializedName("errcode")
private Integer errCode;
@SerializedName("errmsg")
private String errMsg;

public Integer getErrCode() {
return errCode;
}

public void setErrcode(Integer errcode) {
this.errcode = errcode;
public void setErrCode(Integer errCode) {
this.errCode = errCode;
}

public BaseInfo getBase_info() {
return base_info;
public BaseInfo getBaseInfo() {
return baseInfo;
}

public void setBase_info(BaseInfo base_info) {
this.base_info = base_info;
public void setBaseInfo(BaseInfo baseInfo) {
this.baseInfo = baseInfo;
}

public String getErrmsg() {
return errmsg;
public String getErrMsg() {
return errMsg;
}

public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}

private class BaseInfo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package me.chanjar.weixin.mp.bean.device;

import com.google.gson.annotations.SerializedName;

/**
* Created by keungtung on 10/12/2016.
*/

public class RespMsg extends AbstractDeviceBean{
@SerializedName("ret_code")
private Integer retCode;
@SerializedName("error_info")
private String errorInfo;

public Integer getRetCode() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
package me.chanjar.weixin.mp.bean.device;

import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.json.WxGsonBuilder;

/**
* Created by keungtung on 14/12/2016.
*/
public class TransMsgResp extends AbstractDeviceBean{
private Integer ret;
private String ret_info;
private Integer errcode;
private String errmsg;
@SerializedName("ret_info")
private String retInfo;
@SerializedName("errcode")
private Integer errCode;
@SerializedName("errmsg")
private String errMsg;

public static TransMsgResp fromJson(String json) {
return WxGsonBuilder.create().fromJson(json, TransMsgResp.class);
Expand All @@ -23,27 +27,27 @@ public void setRet(Integer ret) {
this.ret = ret;
}

public String getRet_info() {
return ret_info;
public String getRetInfo() {
return retInfo;
}

public void setRet_info(String ret_info) {
this.ret_info = ret_info;
public void setRetInfo(String retInfo) {
this.retInfo = retInfo;
}

public Integer getErrcode() {
return errcode;
public Integer getErrCode() {
return errCode;
}

public void setErrcode(Integer errcode) {
this.errcode = errcode;
public void setErrCode(Integer errCode) {
this.errCode = errCode;
}

public String getErrmsg() {
return errmsg;
public String getErrMsg() {
return errMsg;
}

public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
package me.chanjar.weixin.mp.bean.device;

import com.google.gson.annotations.SerializedName;

/**
* Created by keungtung on 10/12/2016.
*/
public class WxDevice {
private String id;
private String mac;
private String connect_protocol;
private String auth_key;
private String close_strategy;
private String conn_strategy;
private String crypt_method;
private String auth_ver;
private String manu_mac_pos;
private String ser_mac_pos;
private String ble_simple_protocol;
@SerializedName("connect_protocol")
private String connectProtocol;
@SerializedName("auth_key")
private String authKey;
@SerializedName("close_strategy")
private String closeStrategy;
@SerializedName("conn_strategy")
private String connStrategy;
@SerializedName("crypt_method")
private String cryptMethod;
@SerializedName("auth_ver")
private String authVer;
@SerializedName("manu_mac_pos")
private String manuMacPos;
@SerializedName("ser_mac_pos")
private String serMacPos;
@SerializedName("ble_simple_protocol")
private String bleSimpleProtocol;

public String getId() {
return id;
Expand All @@ -32,75 +43,75 @@ public void setMac(String mac) {
this.mac = mac;
}

public String getConnect_protocol() {
return connect_protocol;
public String getConnectProtocol() {
return connectProtocol;
}

public void setConnect_protocol(String connect_protocol) {
this.connect_protocol = connect_protocol;
public void setConnectProtocol(String connectProtocol) {
this.connectProtocol = connectProtocol;
}

public String getAuth_key() {
return auth_key;
public String getAuthKey() {
return authKey;
}

public void setAuth_key(String auth_key) {
this.auth_key = auth_key;
public void setAuthKey(String authKey) {
this.authKey = authKey;
}

public String getClose_strategy() {
return close_strategy;
public String getCloseStrategy() {
return closeStrategy;
}

public void setClose_strategy(String close_strategy) {
this.close_strategy = close_strategy;
public void setCloseStrategy(String closeStrategy) {
this.closeStrategy = closeStrategy;
}

public String getConn_strategy() {
return conn_strategy;
public String getConnStrategy() {
return connStrategy;
}

public void setConn_strategy(String conn_strategy) {
this.conn_strategy = conn_strategy;
public void setConnStrategy(String connStrategy) {
this.connStrategy = connStrategy;
}

public String getCrypt_method() {
return crypt_method;
public String getCryptMethod() {
return cryptMethod;
}

public void setCrypt_method(String crypt_method) {
this.crypt_method = crypt_method;
public void setCryptMethod(String cryptMethod) {
this.cryptMethod = cryptMethod;
}

public String getAuth_ver() {
return auth_ver;
public String getAuthVer() {
return authVer;
}

public void setAuth_ver(String auth_ver) {
this.auth_ver = auth_ver;
public void setAuthVer(String authVer) {
this.authVer = authVer;
}

public String getManu_mac_pos() {
return manu_mac_pos;
public String getManuMacPos() {
return manuMacPos;
}

public void setManu_mac_pos(String manu_mac_pos) {
this.manu_mac_pos = manu_mac_pos;
public void setManuMacPos(String manuMacPos) {
this.manuMacPos = manuMacPos;
}

public String getSer_mac_pos() {
return ser_mac_pos;
public String getSerMacPos() {
return serMacPos;
}

public void setSer_mac_pos(String ser_mac_pos) {
this.ser_mac_pos = ser_mac_pos;
public void setSerMacPos(String serMacPos) {
this.serMacPos = serMacPos;
}

public String getBle_simple_protocol() {
return ble_simple_protocol;
public String getBleSimpleProtocol() {
return bleSimpleProtocol;
}

public void setBle_simple_protocol(String ble_simple_protocol) {
this.ble_simple_protocol = ble_simple_protocol;
public void setBleSimpleProtocol(String bleSimpleProtocol) {
this.bleSimpleProtocol = bleSimpleProtocol;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package me.chanjar.weixin.mp.bean.device;

import com.google.gson.annotations.SerializedName;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
Expand All @@ -8,35 +10,38 @@
* Created by keungtung on 10/12/2016.
*/
public class WxDeviceAuthorize extends AbstractDeviceBean {
private String deivce_num;
private String op_type;
private List<WxDevice> device_list = new LinkedList<>();

public String getDeivce_num() {
return deivce_num;
@SerializedName("device_num")
private String deviceNum;
@SerializedName("op_type")
private String opType;
@SerializedName("device_list")
private List<WxDevice> deviceList = new LinkedList<>();

public String getDeviceNum() {
return deviceNum;
}

public void setDeivce_num(String deivce_num) {
this.deivce_num = deivce_num;
public void setDeviceNum(String deviceNum) {
this.deviceNum = deviceNum;
}

public String getOp_type() {
return op_type;
public String getOpType() {
return opType;
}

public void setOp_type(String op_type) {
this.op_type = op_type;
public void setOpType(String opType) {
this.opType = opType;
}

public List<WxDevice> getDevice_list() {
return device_list;
public List<WxDevice> getDeviceList() {
return deviceList;
}

public void setDevice_list(List<WxDevice> device_list) {
this.device_list = device_list;
public void setDeviceList(List<WxDevice> deviceList) {
this.deviceList = deviceList;
}

public void addDevice(WxDevice... devices) {
this.device_list.addAll(Arrays.asList(devices));
this.deviceList.addAll(Arrays.asList(devices));
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package me.chanjar.weixin.mp.bean.device;

import com.google.gson.annotations.SerializedName;

/**
* Created by keungtung on 10/12/2016.
*/
public class WxDeviceBind extends AbstractDeviceBean{
private String ticket;
private String device_id;
private String openid;
@SerializedName("device_id")
private String deviceId;
@SerializedName("openid")
private String openId;

public String getTicket() {
return ticket;
Expand All @@ -16,19 +20,19 @@ public void setTicket(String ticket) {
this.ticket = ticket;
}

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

public String getOpenid() {
return openid;
public String getOpenId() {
return openId;
}

public void setOpenid(String openid) {
this.openid = openid;
public void setOpenId(String openId) {
this.openId = openId;
}
}
Loading