View Javadoc
1   package com.zone.weixin4j.message;
2   
3   import com.zone.weixin4j.request.WeixinMessage;
4   import com.zone.weixin4j.type.MessageType;
5   
6   import javax.xml.bind.annotation.XmlElement;
7   
8   /**
9    * 文本消息
10   * 
11   * @className TextMessage
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2014年4月6日
14   * @since JDK 1.6
15   * @see <a
16   *      href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140453&token=&lang=zh_CN">订阅号、服务号的文本消息</a>
17   * @see <a
18   *      href="http://qydev.weixin.qq.com/wiki/index.php?title=%E6%8E%A5%E6%94%B6%E6%99%AE%E9%80%9A%E6%B6%88%E6%81%AF#text.E6.B6.88.E6.81.AF">企业号的文本消息</a>
19   */
20  public class TextMessage extends WeixinMessage {
21  
22  	private static final long serialVersionUID = -7018053906644190260L;
23  
24  	public TextMessage() {
25  		super(MessageType.text.name());
26  	}
27  
28  	/**
29  	 * 消息内容
30  	 */
31  	@XmlElement(name = "Content")
32  	private String content;
33  
34  	public String getContent() {
35  		return content;
36  	}
37  
38  	@Override
39  	public String toString() {
40  		return "TextMessage [content=" + content + ", " + super.toString()
41  				+ "]";
42  	}
43  }