This commit is contained in:
Daniel Qian
2014-10-22 15:04:39 +08:00
parent 30fe7a0069
commit 46e66d333a
15 changed files with 76 additions and 81 deletions

View File

@@ -65,12 +65,12 @@ public class WxCpMessage {
/**
* <pre>
* 请使用
* {@link me.chanjar.weixin.cp.api.WxCpConsts#CUSTOM_MSG_TEXT}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#CUSTOM_MSG_IMAGE}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#CUSTOM_MSG_VOICE}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#CUSTOM_MSG_MUSIC}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#CUSTOM_MSG_VIDEO}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#CUSTOM_MSG_NEWS}
* {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_TEXT}
* {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_IMAGE}
* {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_VOICE}
* {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_MUSIC}
* {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_VIDEO}
* {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_NEWS}
* </pre>
* @param msgType
*/

View File

@@ -190,13 +190,13 @@ public class WxCpXmlMessage {
/**
* <pre>
* 当接受用户消息时,可能会获得以下值:
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_TEXT}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_IMAGE}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_VOICE}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_VIDEO}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_LOCATION}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_LINK}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_EVENT}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_TEXT}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_IMAGE}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_VOICE}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_VIDEO}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_LOCATION}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_LINK}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_EVENT}
* </pre>
*
* @return
@@ -208,11 +208,11 @@ public class WxCpXmlMessage {
/**
* <pre>
* 当发送消息的时候使用:
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_TEXT}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_IMAGE}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_VOICE}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_VIDEO}
* {@link me.chanjar.weixin.cp.api.WxCpConsts#XML_MSG_NEWS}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_TEXT}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_IMAGE}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_VOICE}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_VIDEO}
* {@link me.chanjar.weixin.common.api.WxConsts#XML_MSG_NEWS}
* </pre>
*
* @param msgType

View File

@@ -1,14 +1,14 @@
package me.chanjar.weixin.cp.bean;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.MediaIdMarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import me.chanjar.weixin.cp.api.WxCpConsts;
import me.chanjar.weixin.common.util.xml.MediaIdMarshaller;
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class WxCpXmlOutImageMessage extends WxCpXmlOutMessage {
@@ -18,7 +18,7 @@ public class WxCpXmlOutImageMessage extends WxCpXmlOutMessage {
private String mediaId;
public WxCpXmlOutImageMessage() {
this.msgType = WxCpConsts.XML_MSG_IMAGE;
this.msgType = WxConsts.XML_MSG_IMAGE;
}
public String getMediaId() {

View File

@@ -1,18 +1,13 @@
package me.chanjar.weixin.cp.bean;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.AdapterCDATA;
import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import me.chanjar.weixin.cp.api.WxCpConsts;
import me.chanjar.weixin.common.util.xml.AdapterCDATA;
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class WxCpXmlOutMewsMessage extends WxCpXmlOutMessage {
@@ -25,7 +20,7 @@ public class WxCpXmlOutMewsMessage extends WxCpXmlOutMessage {
protected final List<Item> articles = new ArrayList<Item>();
public WxCpXmlOutMewsMessage() {
this.msgType = WxCpConsts.XML_MSG_NEWS;
this.msgType = WxConsts.XML_MSG_NEWS;
}
public int getArticleCount() {

View File

@@ -6,7 +6,7 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import me.chanjar.weixin.cp.api.WxCpConsts;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.AdapterCDATA;
@XmlRootElement(name = "xml")
@@ -18,7 +18,7 @@ public class WxCpXmlOutTextMessage extends WxCpXmlOutMessage {
private String content;
public WxCpXmlOutTextMessage() {
this.msgType = WxCpConsts.XML_MSG_TEXT;
this.msgType = WxConsts.XML_MSG_TEXT;
}
public String getContent() {

View File

@@ -6,7 +6,7 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import me.chanjar.weixin.cp.api.WxCpConsts;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.AdapterCDATA;
@XmlRootElement(name = "xml")
@@ -17,7 +17,7 @@ public class WxCpXmlOutVideoMessage extends WxCpXmlOutMessage {
protected final Video video = new Video();
public WxCpXmlOutVideoMessage() {
this.msgType = WxCpConsts.XML_MSG_VIDEO;
this.msgType = WxConsts.XML_MSG_VIDEO;
}
public String getMediaId() {

View File

@@ -6,7 +6,7 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import me.chanjar.weixin.cp.api.WxCpConsts;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.MediaIdMarshaller;
@XmlRootElement(name = "xml")
@@ -18,7 +18,7 @@ public class WxCpXmlOutVoiceMessage extends WxCpXmlOutMessage {
private String mediaId;
public WxCpXmlOutVoiceMessage() {
this.msgType = WxCpConsts.XML_MSG_VOICE;
this.msgType = WxConsts.XML_MSG_VOICE;
}
public String getMediaId() {