44import java .util .Map ;
55
66/**
7- * 微信开发所使用到的常量类
7+ * 微信开发所使用到的常量类.
88 *
99 * @author chanjarster & binarywang
1010 */
1111public class WxConsts {
1212 /**
13- * 微信推送过来的消息的类型,和发送给微信xml格式消息的消息类型
13+ * 微信推送过来的消息的类型,和发送给微信xml格式消息的消息类型.
1414 */
1515 public static class XmlMsgType {
1616 public static final String TEXT = "text" ;
@@ -31,32 +31,65 @@ public static class XmlMsgType {
3131 }
3232
3333 /**
34- * 主动发送消息(即客服消息)的消息类型
34+ * 主动发送消息(即客服消息)的消息类型.
3535 */
3636 public static class KefuMsgType {
37- public static final String TEXT = "text" ;//文本消息
38- public static final String IMAGE = "image" ;//图片消息
39- public static final String VOICE = "voice" ;//语音消息
40- public static final String VIDEO = "video" ;//视频消息
41- public static final String MUSIC = "music" ;//音乐消息
42- public static final String NEWS = "news" ;//图文消息(点击跳转到外链)
43- public static final String MPNEWS = "mpnews" ;//图文消息(点击跳转到图文消息页面)
44- public static final String FILE = "file" ;//发送文件(CP专用)
45- public static final String TEXTCARD = "textcard" ;//文本卡片消息(CP专用)
46- public static final String WXCARD = "wxcard" ;//卡券消息
37+ /**
38+ * 文本消息.
39+ */
40+ public static final String TEXT = "text" ;
41+ /**
42+ * 图片消息.
43+ */
44+ public static final String IMAGE = "image" ;
45+ /**
46+ * 语音消息.
47+ */
48+ public static final String VOICE = "voice" ;
49+ /**
50+ * 视频消息.
51+ */
52+ public static final String VIDEO = "video" ;
53+ /**
54+ * 音乐消息.
55+ */
56+ public static final String MUSIC = "music" ;
57+ /**
58+ * 图文消息(点击跳转到外链).
59+ */
60+ public static final String NEWS = "news" ;
61+ /**
62+ * 图文消息(点击跳转到图文消息页面).
63+ */
64+ public static final String MPNEWS = "mpnews" ;
65+ /**
66+ * 发送文件(CP专用).
67+ */
68+ public static final String FILE = "file" ;
69+ /**
70+ * 文本卡片消息(CP专用).
71+ */
72+ public static final String TEXTCARD = "textcard" ;
73+ /**
74+ * 卡券消息.
75+ */
76+ public static final String WXCARD = "wxcard" ;
77+ /**
78+ * 转发到客服的消息.
79+ */
4780 public static final String TRANSFER_CUSTOMER_SERVICE = "transfer_customer_service" ;
4881 }
4982
5083 /**
51- * 表示是否是保密消息,0表示否,1表示是,默认0
84+ * 表示是否是保密消息,0表示否,1表示是,默认0.
5285 */
5386 public static class KefuMsgSafe {
5487 public static final String NO = "0" ;
5588 public static final String YES = "1" ;
5689 }
5790
5891 /**
59- * 群发消息的消息类型
92+ * 群发消息的消息类型.
6093 */
6194 public static class MassMsgType {
6295 public static final String MPNEWS = "mpnews" ;
@@ -67,7 +100,7 @@ public static class MassMsgType {
67100 }
68101
69102 /**
70- * 群发消息后微信端推送给服务器的反馈消息
103+ * 群发消息后微信端推送给服务器的反馈消息.
71104 */
72105 public static class MassMsgStatus {
73106 public static final String SEND_SUCCESS = "send success" ;
@@ -83,7 +116,7 @@ public static class MassMsgStatus {
83116 public static final String ERR_21000 = "err(21000)" ;
84117
85118 /**
86- * 群发反馈消息代码所对应的文字描述
119+ * 群发反馈消息代码所对应的文字描述.
87120 */
88121 public static final Map <String , String > STATUS_DESC = new HashMap <>();
89122
@@ -103,7 +136,7 @@ public static class MassMsgStatus {
103136 }
104137
105138 /**
106- * 微信端推送过来的事件类型
139+ * 微信端推送过来的事件类型.
107140 */
108141 public static class EventType {
109142 public static final String SUBSCRIBE = "subscribe" ;
@@ -124,7 +157,7 @@ public static class EventType {
124157 }
125158
126159 /**
127- * 上传多媒体(临时素材)文件的类型
160+ * 上传多媒体(临时素材)文件的类型.
128161 */
129162 public static class MediaFileType {
130163 public static final String IMAGE = "image" ;
@@ -135,78 +168,78 @@ public static class MediaFileType {
135168 }
136169
137170 /**
138- * 自定义菜单的按钮类型
171+ * 自定义菜单的按钮类型.
139172 */
140173 public static class MenuButtonType {
141174 /**
142- * 点击推事件
175+ * 点击推事件.
143176 */
144177 public static final String CLICK = "click" ;
145178 /**
146- * 跳转URL
179+ * 跳转URL.
147180 */
148181 public static final String VIEW = "view" ;
149182 /**
150- * 跳转到小程序
183+ * 跳转到小程序.
151184 */
152185 public static final String MINIPROGRAM = "miniprogram" ;
153186 /**
154- * 扫码推事件
187+ * 扫码推事件.
155188 */
156189 public static final String SCANCODE_PUSH = "scancode_push" ;
157190 /**
158- * 扫码推事件且弹出“消息接收中”提示框
191+ * 扫码推事件且弹出“消息接收中”提示框.
159192 */
160193 public static final String SCANCODE_WAITMSG = "scancode_waitmsg" ;
161194 /**
162- * 弹出系统拍照发图
195+ * 弹出系统拍照发图.
163196 */
164197 public static final String PIC_SYSPHOTO = "pic_sysphoto" ;
165198 /**
166- * 弹出拍照或者相册发图
199+ * 弹出拍照或者相册发图.
167200 */
168201 public static final String PIC_PHOTO_OR_ALBUM = "pic_photo_or_album" ;
169202 /**
170- * 弹出微信相册发图器
203+ * 弹出微信相册发图器.
171204 */
172205 public static final String PIC_WEIXIN = "pic_weixin" ;
173206 /**
174- * 弹出地理位置选择器
207+ * 弹出地理位置选择器.
175208 */
176209 public static final String LOCATION_SELECT = "location_select" ;
177210 /**
178- * 下发消息(除文本消息)
211+ * 下发消息(除文本消息).
179212 */
180213 public static final String MEDIA_ID = "media_id" ;
181214 /**
182- * 跳转图文消息URL
215+ * 跳转图文消息URL.
183216 */
184217 public static final String VIEW_LIMITED = "view_limited" ;
185218 }
186219
187220 /**
188- * oauth2网页授权的scope
221+ * oauth2网页授权的scope.
189222 */
190223 public static class OAuth2Scope {
191224 /**
192- * 不弹出授权页面,直接跳转,只能获取用户openid
225+ * 不弹出授权页面,直接跳转,只能获取用户openid.
193226 */
194227 public static final String SNSAPI_BASE = "snsapi_base" ;
195228 /**
196- * 弹出授权页面,可通过openid拿到昵称、性别、所在地。并且,即使在未关注的情况下,只要用户授权,也能获取其信息
229+ * 弹出授权页面,可通过openid拿到昵称、性别、所在地。并且,即使在未关注的情况下,只要用户授权,也能获取其信息.
197230 */
198231 public static final String SNSAPI_USERINFO = "snsapi_userinfo" ;
199232 }
200233
201234 /**
202- * 网页应用登录授权作用域
235+ * 网页应用登录授权作用域.
203236 */
204237 public static class QrConnectScope {
205238 public static final String SNSAPI_LOGIN = "snsapi_login" ;
206239 }
207240
208241 /**
209- * 永久素材类型
242+ * 永久素材类型.
210243 */
211244 public static class MaterialType {
212245 public static final String NEWS = "news" ;
0 commit comments