1
1
package me .chanjar .weixin .mp .bean .template ;
2
2
3
+ import me .chanjar .weixin .mp .util .json .WxMpGsonBuilder ;
4
+
3
5
import java .io .Serializable ;
4
6
import java .util .ArrayList ;
5
7
import java .util .List ;
6
8
7
- import me .chanjar .weixin .mp .util .json .WxMpGsonBuilder ;
8
-
9
+ /**
10
+ * 参考 http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433751277&token=&lang=zh_CN 发送模板消息接口部分
11
+ */
9
12
public class WxMpTemplateMessage implements Serializable {
10
13
private static final long serialVersionUID = 5063374783759519418L ;
11
14
12
15
private String toUser ;
13
16
private String templateId ;
14
17
private String url ;
15
- private String topColor ;
16
18
private List <WxMpTemplateData > data = new ArrayList <>();
17
19
18
20
public String getToUser () {
@@ -39,14 +41,6 @@ public void setUrl(String url) {
39
41
this .url = url ;
40
42
}
41
43
42
- public String getTopColor () {
43
- return this .topColor ;
44
- }
45
-
46
- public void setTopColor (String topColor ) {
47
- this .topColor = topColor ;
48
- }
49
-
50
44
public List <WxMpTemplateData > getData () {
51
45
return this .data ;
52
46
}
@@ -71,7 +65,6 @@ public static class WxMpTemplateMessageBuilder {
71
65
private String toUser ;
72
66
private String templateId ;
73
67
private String url ;
74
- private String topColor ;
75
68
private List <WxMpTemplateData > data = new ArrayList <>();
76
69
77
70
public WxMpTemplateMessageBuilder toUser (String toUser ) {
@@ -89,11 +82,6 @@ public WxMpTemplateMessageBuilder url(String url) {
89
82
return this ;
90
83
}
91
84
92
- public WxMpTemplateMessageBuilder topColor (String topColor ) {
93
- this .topColor = topColor ;
94
- return this ;
95
- }
96
-
97
85
public WxMpTemplateMessageBuilder data (List <WxMpTemplateData > data ) {
98
86
this .data = data ;
99
87
return this ;
@@ -103,7 +91,6 @@ public WxMpTemplateMessageBuilder from(WxMpTemplateMessage origin) {
103
91
this .toUser (origin .toUser );
104
92
this .templateId (origin .templateId );
105
93
this .url (origin .url );
106
- this .topColor (origin .topColor );
107
94
this .data (origin .data );
108
95
return this ;
109
96
}
@@ -113,7 +100,6 @@ public WxMpTemplateMessage build() {
113
100
m .toUser = this .toUser ;
114
101
m .templateId = this .templateId ;
115
102
m .url = this .url ;
116
- m .topColor = this .topColor ;
117
103
m .data = this .data ;
118
104
return m ;
119
105
}
0 commit comments