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.ShareSourceType;
8
9
10
11
12
13
14
15
16
17
18 public class ArticleDatacubeShare implements Serializable {
19 private static final long serialVersionUID = 3841239305410294553L;
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 = "shareUser")
35 private int shareUser;
36
37
38
39 @JSONField(name = "shareCount")
40 private int shareCount;
41
42
43
44 @JSONField(name = "share_scene")
45 private int shareScene;
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 getShareUser() {
64 return shareUser;
65 }
66
67 public void setShareUser(int shareUser) {
68 this.shareUser = shareUser;
69 }
70
71 public int getShareCount() {
72 return shareCount;
73 }
74
75 public void setShareCount(int shareCount) {
76 this.shareCount = shareCount;
77 }
78
79 public int getShareScene() {
80 return shareScene;
81 }
82
83 @JSONField(serialize = false)
84 public ShareSourceType getFormatShareScene() {
85 if (shareScene == 1) {
86 return ShareSourceType.FRIENDFORWARD;
87 } else if (shareScene == 2) {
88 return ShareSourceType.FRIENDSCIRCLE;
89 } else if (shareScene == 3) {
90 return ShareSourceType.TENCENTWEIBO;
91 } else {
92 return ShareSourceType.OTHER;
93 }
94 }
95
96 public void setShareScene(int shareScene) {
97 this.shareScene = shareScene;
98 }
99
100 @Override
101 public String toString() {
102 return "ArticleDatacubeShare [refDate=" + refDate + ", refHour="
103 + refHour + ", shareUser=" + shareUser + ", shareCount="
104 + shareCount + ", shareScene=" + shareScene + "]";
105 }
106 }