View Javadoc
1   package com.foxinmy.weixin4j.qy.chat;
2   
3   import java.io.Serializable;
4   
5   import javax.xml.bind.annotation.XmlElement;
6   import javax.xml.bind.annotation.XmlTransient;
7   
8   /**
9    * 接收人
10   * 
11   * @className ChatReceiver
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2015年8月1日
14   * @since JDK 1.6
15   * @see
16   */
17  public class ChatReceiver implements Serializable {
18  
19  	private static final long serialVersionUID = -3870813624685620828L;
20  	/**
21  	 * 成员id|会话id
22  	 */
23  	@XmlElement(name = "id")
24  	private String targetId;
25  	/**
26  	 * 群聊|单聊|userid|openid
27  	 */
28  	@XmlElement(name = "type")
29  	private String chatType;
30  
31  	public String getTargetId() {
32  		return targetId;
33  	}
34  
35  	public String getChatType() {
36  		return chatType;
37  	}
38  
39  	@XmlTransient
40  	public ChatType getFormatChatType() {
41  		return ChatType.valueOf(chatType);
42  	}
43  
44  	@Override
45  	public String toString() {
46  		return "ChatReceiver [targetId=" + targetId + ", chatType=" + chatType
47  				+ "]";
48  	}
49  
50  }