View Javadoc
1   package com.zone.weixin4j.mp.event;
2   
3   import com.zone.weixin4j.message.event.EventMessage;
4   import com.zone.weixin4j.type.EventType;
5   
6   import javax.xml.bind.annotation.XmlElement;
7   
8   /**
9    * 群发消息事件推送
10   * 
11   * @className MassEventMessage
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2014年4月27日
14   * @since JDK 1.6
15   * @see <a
16   *      href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140549&token=&lang=zh_CN">群发回调</a>
17   */
18  public class MassEventMessage extends EventMessage {
19  
20  	private static final long serialVersionUID = -1660543255873723895L;
21  
22  	public MassEventMessage() {
23  		super(EventType.masssendjobfinish.name());
24  	}
25  
26  	/**
27  	 * 群发后的状态信息 为“send success”或“send fail”或“err(num)
28  	 */
29  	@XmlElement(name = "Status")
30  	private String status;
31  	/**
32  	 * group_id下粉丝数;或者openid_list中的粉丝数
33  	 */
34  	@XmlElement(name = "TotalCount")
35  	private int totalCount;
36  	/**
37  	 * 过滤(过滤是指特定地区、性别的过滤、用户设置拒收的过滤,用户接收已超4条的过滤)后,准备发送的粉丝数,原则上,FilterCount =
38  	 * SentCount + ErrorCount
39  	 */
40  	@XmlElement(name = "FilterCount")
41  	private int filterCount;
42  	/**
43  	 * 发送成功的粉丝数
44  	 */
45  	@XmlElement(name = "SentCount")
46  	private int sentCount;
47  	/**
48  	 * 发送失败的粉丝数
49  	 */
50  	@XmlElement(name = "ErrorCount")
51  	private int errorCount;
52  
53  	public String getStatus() {
54  		return status;
55  	}
56  
57  	public int getTotalCount() {
58  		return totalCount;
59  	}
60  
61  	public int getFilterCount() {
62  		return filterCount;
63  	}
64  
65  	public int getSentCount() {
66  		return sentCount;
67  	}
68  
69  	public int getErrorCount() {
70  		return errorCount;
71  	}
72  
73  	@Override
74  	public String toString() {
75  		return "MassEventMessage [status=" + status + ", totalCount="
76  				+ totalCount + ", filterCount=" + filterCount + ", sentCount="
77  				+ sentCount + ", errorCount=" + errorCount + ", "
78  				+ super.toString() + "]";
79  	}
80  }