mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
使用lombok的@Data注解简化common模块的所有bean类
This commit is contained in:
@@ -3,6 +3,7 @@ package me.chanjar.weixin.mp.bean.datacube;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
@@ -15,6 +16,7 @@ import java.util.List;
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WxDataCubeArticleResult extends WxDataCubeBaseResult {
|
||||
private static final long serialVersionUID = -9222452497954511765L;
|
||||
|
||||
|
||||
@@ -3,37 +3,38 @@ package me.chanjar.weixin.mp.bean.datacube;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 图文分析数据接口返回结果对象
|
||||
* <p>
|
||||
* 图文分析数据接口返回结果对象.
|
||||
* Created by Binary Wang on 2016/8/24.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WxDataCubeArticleTotal extends WxDataCubeBaseResult {
|
||||
private static final long serialVersionUID = -7634365687303052699L;
|
||||
|
||||
/**
|
||||
* msgid
|
||||
* msgid.
|
||||
* 请注意:这里的msgid实际上是由msgid(图文消息id,这也就是群发接口调用后返回的msg_data_id)和index(消息次序索引)组成, 例如12003_3, 其中12003是msgid,即一次群发的消息的id; 3为index,假设该次群发的图文消息共5个文章(因为可能为多图文),3表示5个中的第3个
|
||||
*/
|
||||
@SerializedName("msgid")
|
||||
private String msgId;
|
||||
|
||||
/**
|
||||
* title
|
||||
* title.
|
||||
* 图文消息的标题
|
||||
*/
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* details
|
||||
* details.
|
||||
* 详细信息
|
||||
*/
|
||||
@SerializedName("details")
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 统计接口的共用属性类
|
||||
* 统计接口的共用属性类.
|
||||
* Created by Binary Wang on 2016/8/25.
|
||||
* </pre>
|
||||
*
|
||||
@@ -21,7 +21,7 @@ public abstract class WxDataCubeBaseResult implements Serializable {
|
||||
protected static final JsonParser JSON_PARSER = new JsonParser();
|
||||
|
||||
/**
|
||||
* ref_date
|
||||
* ref_date.
|
||||
* 数据的日期,需在begin_date和end_date之间
|
||||
*/
|
||||
@SerializedName("ref_date")
|
||||
|
||||
@@ -3,6 +3,7 @@ package me.chanjar.weixin.mp.bean.datacube;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
@@ -15,6 +16,7 @@ import java.util.List;
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WxDataCubeInterfaceResult extends WxDataCubeBaseResult {
|
||||
private static final long serialVersionUID = 597734329161281398L;
|
||||
|
||||
|
||||
@@ -3,51 +3,52 @@ package me.chanjar.weixin.mp.bean.datacube;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息分析数据接口返回结果对象
|
||||
* <p>
|
||||
* 消息分析数据接口返回结果对象.
|
||||
* Created by Binary Wang on 2016/8/29.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WxDataCubeMsgResult extends WxDataCubeBaseResult {
|
||||
private static final long serialVersionUID = 6932121822150573659L;
|
||||
|
||||
/**
|
||||
* ref_hour
|
||||
* ref_hour.
|
||||
* 数据的小时,包括从000到2300,分别代表的是[000,100)到[2300,2400),即每日的第1小时和最后1小时
|
||||
*/
|
||||
@SerializedName("ref_hour")
|
||||
private Integer refHour;
|
||||
|
||||
/**
|
||||
* msg_type
|
||||
* msg_type.
|
||||
* 消息类型,代表含义如下:1代表文字 2代表图片 3代表语音 4代表视频 6代表第三方应用消息(链接消息)
|
||||
*/
|
||||
@SerializedName("msg_type")
|
||||
private Integer msgType;
|
||||
|
||||
/**
|
||||
* msg_user
|
||||
* msg_user.
|
||||
* 上行发送了(向公众号发送了)消息的用户数
|
||||
*/
|
||||
@SerializedName("msg_user")
|
||||
private Integer msgUser;
|
||||
|
||||
/**
|
||||
* msg_count
|
||||
* msg_count.
|
||||
* 上行发送了消息的消息总数
|
||||
*/
|
||||
@SerializedName("msg_count")
|
||||
private Integer msgCount;
|
||||
|
||||
/**
|
||||
* count_interval
|
||||
* count_interval.
|
||||
* 当日发送消息量分布的区间,0代表 “0”,1代表“1-5”,2代表“6-10”,3代表“10次以上”
|
||||
*/
|
||||
@SerializedName("count_interval")
|
||||
@@ -61,7 +62,7 @@ public class WxDataCubeMsgResult extends WxDataCubeBaseResult {
|
||||
private Integer intPageReadCount;
|
||||
|
||||
/**
|
||||
* ori_page_read_user
|
||||
* ori_page_read_user.
|
||||
* 原文页(点击图文页“阅读原文”进入的页面)的阅读人数,无原文页时此处数据为0
|
||||
*/
|
||||
@SerializedName("ori_page_read_user")
|
||||
|
||||
@@ -2,12 +2,14 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 10/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BaseResp extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = 4252655933699659073L;
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 10/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class RespMsg extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = -4241272701707684136L;
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 14/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class TransMsgResp extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = 5386954916622816491L;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
@@ -12,6 +13,7 @@ import java.util.List;
|
||||
* @date 10/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxDeviceAuthorize extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = 8786321356569903887L;
|
||||
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 10/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxDeviceAuthorizeResult extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = 9105294570912249811L;
|
||||
|
||||
|
||||
@@ -2,12 +2,14 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 10/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxDeviceBind extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = 467559769037590880L;
|
||||
|
||||
|
||||
@@ -2,15 +2,17 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 16/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxDeviceBindDeviceResult extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = 725870295905935355L;
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
/**
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 10/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxDeviceBindResult extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = 4687725146279339359L;
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.common.util.ToStringUtils;
|
||||
|
||||
/**
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 10/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxDeviceMsg extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = -5567110858455277963L;
|
||||
|
||||
|
||||
@@ -2,15 +2,17 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 16/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxDeviceOpenIdResult extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = 4980885167833836220L;
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package me.chanjar.weixin.mp.bean.device;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
/**
|
||||
* @author keungtung
|
||||
* @author keungtung.
|
||||
* @date 10/12/2016
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxDeviceQrCodeResult extends AbstractDeviceBean {
|
||||
private static final long serialVersionUID = -4312858303060918266L;
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@ package me.chanjar.weixin.mp.bean.message;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamMediaIdConverter;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WxMpXmlOutImageMessage extends WxMpXmlOutMessage {
|
||||
private static final long serialVersionUID = -2684778597067990723L;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package me.chanjar.weixin.mp.bean.message;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
|
||||
@@ -12,6 +13,7 @@ import java.util.List;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WxMpXmlOutNewsMessage extends WxMpXmlOutMessage {
|
||||
private static final long serialVersionUID = -4604402850905714772L;
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@ package me.chanjar.weixin.mp.bean.message;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WxMpXmlOutTextMessage extends WxMpXmlOutMessage {
|
||||
private static final long serialVersionUID = -3972786455288763361L;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package me.chanjar.weixin.mp.bean.message;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
|
||||
@@ -10,6 +11,7 @@ import java.io.Serializable;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WxMpXmlOutTransferKefuMessage extends WxMpXmlOutMessage {
|
||||
private static final long serialVersionUID = 1850903037285841322L;
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@ package me.chanjar.weixin.mp.bean.message;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamMediaIdConverter;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WxMpXmlOutVoiceMessage extends WxMpXmlOutMessage {
|
||||
private static final long serialVersionUID = 240367390249860551L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user