mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 16:18:51 +08:00
CP部分bean实现序列号接口,并添加serialVersionUID to fix #66
This commit is contained in:
parent
2af7bee103
commit
87f023e680
@ -1,9 +1,9 @@
|
||||
package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
/**
|
||||
* 微信部门
|
||||
*
|
||||
@ -11,9 +11,6 @@ import java.io.Serializable;
|
||||
*/
|
||||
public class WxCpDepart implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5028321625140879571L;
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
@ -1,12 +1,17 @@
|
||||
package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import me.chanjar.weixin.cp.bean.messagebuilder.*;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import me.chanjar.weixin.cp.bean.messagebuilder.FileBuilder;
|
||||
import me.chanjar.weixin.cp.bean.messagebuilder.ImageBuilder;
|
||||
import me.chanjar.weixin.cp.bean.messagebuilder.NewsBuilder;
|
||||
import me.chanjar.weixin.cp.bean.messagebuilder.TextBuilder;
|
||||
import me.chanjar.weixin.cp.bean.messagebuilder.VideoBuilder;
|
||||
import me.chanjar.weixin.cp.bean.messagebuilder.VoiceBuilder;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
/**
|
||||
* 消息
|
||||
*
|
||||
@ -14,9 +19,6 @@ import java.util.List;
|
||||
*/
|
||||
public class WxCpMessage implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2082278303476631708L;
|
||||
private String toUser;
|
||||
private String toParty;
|
||||
|
@ -1,17 +1,14 @@
|
||||
package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
/**
|
||||
* Created by Daniel Qian
|
||||
*/
|
||||
public class WxCpTag implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7243320279646928402L;
|
||||
|
||||
private String id;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
/**
|
||||
* 微信用户信息
|
||||
*
|
||||
@ -13,9 +13,6 @@ import java.util.List;
|
||||
*/
|
||||
public class WxCpUser implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5696099236344075582L;
|
||||
private final List<Attr> extAttrs = new ArrayList<>();
|
||||
private String userId;
|
||||
|
@ -1,19 +1,21 @@
|
||||
package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
import me.chanjar.weixin.cp.api.WxCpConfigStorage;
|
||||
import me.chanjar.weixin.cp.util.crypto.WxCpCryptUtil;
|
||||
import me.chanjar.weixin.cp.util.xml.XStreamTransformer;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
import me.chanjar.weixin.cp.api.WxCpConfigStorage;
|
||||
import me.chanjar.weixin.cp.util.crypto.WxCpCryptUtil;
|
||||
import me.chanjar.weixin.cp.util.xml.XStreamTransformer;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 微信推送过来的消息,也是同步回复给用户的消息,xml格式
|
||||
@ -27,16 +29,12 @@ import java.util.List;
|
||||
*/
|
||||
@XStreamAlias("xml")
|
||||
public class WxCpXmlMessage implements Serializable {
|
||||
private static final long serialVersionUID = -1042994982179476410L;
|
||||
|
||||
///////////////////////
|
||||
// 以下都是微信推送过来的消息的xml的element所对应的属性
|
||||
///////////////////////
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -1042994982179476410L;
|
||||
|
||||
@XStreamAlias("AgentID")
|
||||
private Integer agentId;
|
||||
|
||||
|
@ -2,11 +2,13 @@ package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamMediaIdConverter;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
public class WxCpXmlOutImageMessage extends WxCpXmlOutMessage {
|
||||
private static final long serialVersionUID = -1099446240667237313L;
|
||||
|
||||
@XStreamAlias("Image")
|
||||
@XStreamConverter(value = XStreamMediaIdConverter.class)
|
||||
|
@ -8,8 +8,12 @@ import me.chanjar.weixin.cp.bean.outxmlbuilder.*;
|
||||
import me.chanjar.weixin.cp.util.crypto.WxCpCryptUtil;
|
||||
import me.chanjar.weixin.cp.util.xml.XStreamTransformer;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
public abstract class WxCpXmlOutMessage {
|
||||
public abstract class WxCpXmlOutMessage implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1418629839964153110L;
|
||||
|
||||
@XStreamAlias("ToUserName")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
|
@ -1,15 +1,17 @@
|
||||
package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
public class WxCpXmlOutNewsMessage extends WxCpXmlOutMessage {
|
||||
private static final long serialVersionUID = -5796178637883178826L;
|
||||
|
||||
@XStreamAlias("Articles")
|
||||
protected final List<Item> articles = new ArrayList<>();
|
||||
|
@ -2,11 +2,13 @@ package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
public class WxCpXmlOutTextMessage extends WxCpXmlOutMessage {
|
||||
private static final long serialVersionUID = 2569239617185930232L;
|
||||
|
||||
@XStreamAlias("Content")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
|
@ -2,11 +2,13 @@ package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
public class WxCpXmlOutVideoMessage extends WxCpXmlOutMessage {
|
||||
private static final long serialVersionUID = -8672761162722733622L;
|
||||
|
||||
@XStreamAlias("Video")
|
||||
protected final Video video = new Video();
|
||||
|
@ -2,11 +2,13 @@ package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamMediaIdConverter;
|
||||
|
||||
@XStreamAlias("xml")
|
||||
public class WxCpXmlOutVoiceMessage extends WxCpXmlOutMessage {
|
||||
private static final long serialVersionUID = -7947384031546099340L;
|
||||
|
||||
@XStreamAlias("Voice")
|
||||
@XStreamConverter(value = XStreamMediaIdConverter.class)
|
||||
|
Loading…
Reference in New Issue
Block a user