11package me .chanjar .weixin .cp .bean ;
22
3+ import lombok .Data ;
34import me .chanjar .weixin .common .api .WxConsts ;
45import me .chanjar .weixin .cp .bean .article .MpnewsArticle ;
56import me .chanjar .weixin .cp .bean .article .NewArticle ;
1112import java .util .List ;
1213
1314/**
14- * 消息
15+ * 消息.
1516 *
1617 * @author Daniel Qian
1718 */
19+ @ Data
1820public class WxCpMessage implements Serializable {
19-
2021 private static final long serialVersionUID = -2082278303476631708L ;
22+
2123 private String toUser ;
2224 private String toParty ;
2325 private String toTag ;
@@ -36,104 +38,61 @@ public class WxCpMessage implements Serializable {
3638 private List <MpnewsArticle > mpnewsArticles = new ArrayList <>();
3739
3840 /**
39- * 获得文本消息builder
41+ * 获得文本消息builder.
4042 */
4143 public static TextBuilder TEXT () {
4244 return new TextBuilder ();
4345 }
4446
4547 /**
46- * 获得文本卡片消息builder
48+ * 获得文本卡片消息builder.
4749 */
4850 public static TextCardBuilder TEXTCARD () {
4951 return new TextCardBuilder ();
5052 }
5153
5254 /**
53- * 获得图片消息builder
55+ * 获得图片消息builder.
5456 */
5557 public static ImageBuilder IMAGE () {
5658 return new ImageBuilder ();
5759 }
5860
5961 /**
60- * 获得语音消息builder
62+ * 获得语音消息builder.
6163 */
6264 public static VoiceBuilder VOICE () {
6365 return new VoiceBuilder ();
6466 }
6567
6668 /**
67- * 获得视频消息builder
69+ * 获得视频消息builder.
6870 */
6971 public static VideoBuilder VIDEO () {
7072 return new VideoBuilder ();
7173 }
7274
7375 /**
74- * 获得图文消息builder
76+ * 获得图文消息builder.
7577 */
7678 public static NewsBuilder NEWS () {
7779 return new NewsBuilder ();
7880 }
7981
8082 /**
81- * 获得mpnews图文消息builder
83+ * 获得mpnews图文消息builder.
8284 */
8385 public static MpnewsBuilder MPNEWS () {
8486 return new MpnewsBuilder ();
8587 }
8688
8789 /**
88- * 获得文件消息builder
90+ * 获得文件消息builder.
8991 */
9092 public static FileBuilder FILE () {
9193 return new FileBuilder ();
9294 }
9395
94- public List <MpnewsArticle > getMpnewsArticles () {
95- return mpnewsArticles ;
96- }
97-
98- public void setMpnewsArticles (List <MpnewsArticle > mpnewsArticles ) {
99- this .mpnewsArticles = mpnewsArticles ;
100- }
101-
102- public String getToUser () {
103- return this .toUser ;
104- }
105-
106- public void setToUser (String toUser ) {
107- this .toUser = toUser ;
108- }
109-
110- public String getToParty () {
111- return this .toParty ;
112- }
113-
114- public void setToParty (String toParty ) {
115- this .toParty = toParty ;
116- }
117-
118- public String getToTag () {
119- return this .toTag ;
120- }
121-
122- public void setToTag (String toTag ) {
123- this .toTag = toTag ;
124- }
125-
126- public Integer getAgentId () {
127- return this .agentId ;
128- }
129-
130- public void setAgentId (Integer agentId ) {
131- this .agentId = agentId ;
132- }
133-
134- public String getMsgType () {
135- return this .msgType ;
136- }
13796
13897 /**
13998 * <pre>
@@ -153,87 +112,8 @@ public void setMsgType(String msgType) {
153112 this .msgType = msgType ;
154113 }
155114
156- public String getSafe () {
157- return this .safe ;
158- }
159-
160- public void setSafe (String safe ) {
161- this .safe = safe ;
162- }
163-
164- public String getContent () {
165- return this .content ;
166- }
167-
168- public void setContent (String content ) {
169- this .content = content ;
170- }
171-
172- public String getMediaId () {
173- return this .mediaId ;
174- }
175-
176- public void setMediaId (String mediaId ) {
177- this .mediaId = mediaId ;
178- }
179-
180- public String getThumbMediaId () {
181- return this .thumbMediaId ;
182- }
183-
184- public void setThumbMediaId (String thumbMediaId ) {
185- this .thumbMediaId = thumbMediaId ;
186- }
187-
188- public String getTitle () {
189- return this .title ;
190- }
191-
192- public void setTitle (String title ) {
193- this .title = title ;
194- }
195-
196- public String getDescription () {
197- return this .description ;
198- }
199-
200- public void setDescription (String description ) {
201- this .description = description ;
202- }
203-
204- public String getMusicUrl () {
205- return this .musicUrl ;
206- }
207-
208- public void setMusicUrl (String musicUrl ) {
209- this .musicUrl = musicUrl ;
210- }
211-
212- public String getHqMusicUrl () {
213- return this .hqMusicUrl ;
214- }
215-
216- public void setHqMusicUrl (String hqMusicUrl ) {
217- this .hqMusicUrl = hqMusicUrl ;
218- }
219-
220- public List <NewArticle > getArticles () {
221- return this .articles ;
222- }
223-
224- public void setArticles (List <NewArticle > articles ) {
225- this .articles = articles ;
226- }
227-
228115 public String toJson () {
229116 return WxCpGsonBuilder .INSTANCE .create ().toJson (this );
230117 }
231118
232- public String getUrl () {
233- return this .url ;
234- }
235-
236- public void setUrl (String url ) {
237- this .url = url ;
238- }
239119}
0 commit comments