View Javadoc
1   package com.foxinmy.weixin4j.mp.datacube;
2   
3   import java.io.Serializable;
4   import java.util.Date;
5   
6   import com.alibaba.fastjson.annotation.JSONField;
7   import com.foxinmy.weixin4j.mp.type.DatacuteCountIntervalType;
8   
9   /**
10   * 数据统计:消息发送分布数据
11   * 
12   * @className UpstreamMsgDist
13   * @author jinyu(foxinmy@gmail.com)
14   * @date 2015年1月30日
15   * @since JDK 1.6
16   * @see
17   */
18  public class UpstreamMsgDist implements Serializable {
19  
20  	private static final long serialVersionUID = -2605207523094962029L;
21  	/**
22  	 * 引用的日期
23  	 */
24  	@JSONField(name = "ref_date")
25  	private Date refDate;
26  	/**
27  	 * 上行发送了(向公众号发送了)消息的用户数
28  	 */
29  	@JSONField(name = "msg_user")
30  	private int msgUser;
31  	/**
32  	 * 当日发送消息量分布的区间,0代表 “0”,1代表“1-5”,2代表“6-10”,3代表“10次以上
33  	 */
34  	@JSONField(name = "count_interval")
35  	private int countInterval;
36  
37  	public Date getRefDate() {
38  		return refDate;
39  	}
40  
41  	public void setRefDate(Date refDate) {
42  		this.refDate = refDate;
43  	}
44  
45  	public int getMsgUser() {
46  		return msgUser;
47  	}
48  
49  	public void setMsgUser(int msgUser) {
50  		this.msgUser = msgUser;
51  	}
52  
53  	public int getCountInterval() {
54  		return countInterval;
55  	}
56  
57  	@JSONField(serialize = false)
58  	public DatacuteCountIntervalType getFormatCountInterval() {
59  		return DatacuteCountIntervalType.values()[countInterval];
60  	}
61  
62  	public void setCountInterval(int countInterval) {
63  		this.countInterval = countInterval;
64  	}
65  
66  	@Override
67  	public String toString() {
68  		return "UpstreamMsgDist [refDate=" + refDate + ", msgUser=" + msgUser
69  				+ ", countInterval=" + countInterval + "]";
70  	}
71  }