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
8
9
10
11
12
13
14
15
16
17 public class UpstreamMsg implements Serializable {
18
19 private static final long serialVersionUID = -2605207523094962029L;
20
21
22
23
24 @JSONField(name = "ref_date")
25 private Date refDate;
26
27
28
29 @JSONField(name = "ref_hour")
30 private int refHour;
31
32
33
34 @JSONField(name = "msg_type")
35 private int msgType;
36
37
38
39 @JSONField(name = "msg_user")
40 private int msgUser;
41
42
43
44 @JSONField(name = "msg_count")
45 private int msgCount;
46
47 public Date getRefDate() {
48 return refDate;
49 }
50
51 public void setRefDate(Date refDate) {
52 this.refDate = refDate;
53 }
54
55 public int getRefHour() {
56 return refHour;
57 }
58
59 public void setRefHour(int refHour) {
60 this.refHour = refHour;
61 }
62
63 public int getMsgType() {
64 return msgType;
65 }
66
67
68
69
70
71
72 @JSONField(serialize = false)
73 public String getFormatMsgType() {
74 switch (msgType) {
75 case 1:
76 return "text";
77 case 2:
78 return "image";
79 case 3:
80 return "voice";
81 case 4:
82 return "video";
83 case 6:
84 return "link";
85 default:
86 return null;
87 }
88 }
89
90 public void setMsgType(int msgType) {
91 this.msgType = msgType;
92 }
93
94 public int getMsgUser() {
95 return msgUser;
96 }
97
98 public void setMsgUser(int msgUser) {
99 this.msgUser = msgUser;
100 }
101
102 public int getMsgCount() {
103 return msgCount;
104 }
105
106 public void setMsgCount(int msgCount) {
107 this.msgCount = msgCount;
108 }
109
110 @Override
111 public String toString() {
112 return "UpstreamMsg [refDate=" + refDate + ", refHour=" + refHour
113 + ", msgType=" + msgType + ", msgUser=" + msgUser
114 + ", msgCount=" + msgCount + "]";
115 }
116 }