File tree Expand file tree Collapse file tree 4 files changed +70
-5
lines changed
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean Expand file tree Collapse file tree 4 files changed +70
-5
lines changed Original file line number Diff line number Diff line change 6
6
import lombok .Builder ;
7
7
import lombok .Data ;
8
8
import lombok .NoArgsConstructor ;
9
- import me .chanjar .weixin .cp .constant .WxCpConsts .AppChatMsgType ;
10
9
import me .chanjar .weixin .cp .bean .article .MpnewsArticle ;
11
10
import me .chanjar .weixin .cp .bean .article .NewArticle ;
11
+ import me .chanjar .weixin .cp .constant .WxCpConsts .AppChatMsgType ;
12
12
13
13
import java .io .Serializable ;
14
14
import java .util .List ;
28
28
public class WxCpAppChatMessage implements Serializable {
29
29
private static final long serialVersionUID = -5469013416372240229L ;
30
30
31
+ /**
32
+ * 消息类型
33
+ */
31
34
private String msgType ;
35
+ /**
36
+ * 消息内容
37
+ */
32
38
private String content ;
39
+ /**
40
+ * 群聊id
41
+ */
33
42
private String chatId ;
43
+ /**
44
+ * 图片媒体文件id,可以调用上传临时素材接口获取
45
+ */
34
46
private String mediaId ;
47
+ /**
48
+ * 视频消息的标题,不超过128个字节,超过会自动截断
49
+ */
35
50
private String title ;
51
+ /**
52
+ * 视频消息的描述,不超过512个字节,超过会自动截断
53
+ */
36
54
private String description ;
55
+ /**
56
+ * 表示是否是保密消息
57
+ */
37
58
private Boolean safe ;
59
+ /**
60
+ * 点击后跳转的链接。
61
+ */
38
62
private String url ;
63
+ /**
64
+ * 按钮文字。 默认为“详情”, 不超过4个文字,超过自动截断。
65
+ */
39
66
private String btnTxt ;
67
+ /**
68
+ * 图文消息,一个图文消息支持1到8条图文
69
+ */
40
70
private List <NewArticle > articles ;
71
+ /**
72
+ * Mpnews图文消息,一个图文消息支持1到8条图文
73
+ */
41
74
private List <MpnewsArticle > mpnewsArticles ;
42
75
43
76
/**
Original file line number Diff line number Diff line change 8
8
import me .chanjar .weixin .cp .bean .article .NewArticle ;
9
9
import me .chanjar .weixin .cp .bean .messagebuilder .*;
10
10
import me .chanjar .weixin .cp .bean .taskcard .TaskCardButton ;
11
- import me .chanjar .weixin .cp .constant .WxCpConsts ;
12
11
import org .apache .commons .lang3 .StringUtils ;
13
12
14
13
import java .io .Serializable ;
Original file line number Diff line number Diff line change 17
17
public class MpnewsArticle implements Serializable {
18
18
private static final long serialVersionUID = 6985871812170756481L ;
19
19
20
+ /**
21
+ * 标题,不超过128个字节,超过会自动截断
22
+ */
20
23
private String title ;
24
+ /**
25
+ * 图文消息缩略图的media_id, 可以通过素材管理接口获得。此处thumb_media_id即上传接口返回的media_id
26
+ */
21
27
private String thumbMediaId ;
28
+ /**
29
+ * 图文消息的作者,不超过64个字节
30
+ */
22
31
private String author ;
32
+ /**
33
+ * 图文消息点击“阅读原文”之后的页面链接
34
+ */
23
35
private String contentSourceUrl ;
36
+ /**
37
+ * 图文消息的内容,支持html标签,不超过666 K个字节
38
+ */
24
39
private String content ;
40
+ /**
41
+ * 图文消息的描述,不超过512个字节,超过会自动截断
42
+ */
25
43
private String digest ;
44
+ /**
45
+ * 可能已经废弃了,官方文档里已经看不到了
46
+ */
47
+ @ Deprecated
26
48
private String showCoverPic ;
27
49
28
50
}
Original file line number Diff line number Diff line change 1
1
package me .chanjar .weixin .cp .bean .article ;
2
2
3
- import java .io .Serializable ;
4
-
5
3
import lombok .AllArgsConstructor ;
6
4
import lombok .Builder ;
7
5
import lombok .Data ;
8
6
import lombok .NoArgsConstructor ;
9
7
8
+ import java .io .Serializable ;
9
+
10
10
/**
11
11
* <pre>
12
12
* Created by BinaryWang on 2017/3/27.
20
20
@ NoArgsConstructor
21
21
public class NewArticle implements Serializable {
22
22
private static final long serialVersionUID = 4087852055781140659L ;
23
-
23
+ /**
24
+ * 标题,不超过128个字节,超过会自动截断
25
+ */
24
26
private String title ;
27
+ /**
28
+ * 描述,不超过512个字节,超过会自动截断
29
+ */
25
30
private String description ;
31
+ /**
32
+ * 点击后跳转的链接。
33
+ */
26
34
private String url ;
35
+ /**
36
+ * 图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图1068*455,小图150*150。
37
+ */
27
38
private String picUrl ;
28
39
29
40
}
You can’t perform that action at this time.
0 commit comments