Skip to content

Commit 6e75ca2

Browse files
committed
#309 企业微信新增常量类WxCpConsts,存放包含事件类型在内的一些常量
1 parent d9d67b1 commit 6e75ca2

File tree

2 files changed

+148
-1
lines changed

2 files changed

+148
-1
lines changed

weixin-java-common/src/main/java/me/chanjar/weixin/common/api/WxConsts.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,32 @@ public static class EventType {
151151
public static final String CLICK = "CLICK";
152152
public static final String VIEW = "VIEW";
153153
public static final String MASS_SEND_JOB_FINISH = "MASSSENDJOBFINISH";
154+
/**
155+
* 扫码推事件的事件推送
156+
*/
154157
public static final String SCANCODE_PUSH = "scancode_push";
158+
/**
159+
* 扫码推事件且弹出“消息接收中”提示框的事件推送.
160+
*/
155161
public static final String SCANCODE_WAITMSG = "scancode_waitmsg";
162+
/**
163+
* 弹出系统拍照发图的事件推送.
164+
*/
156165
public static final String PIC_SYSPHOTO = "pic_sysphoto";
166+
/**
167+
* 弹出拍照或者相册发图的事件推送.
168+
*/
157169
public static final String PIC_PHOTO_OR_ALBUM = "pic_photo_or_album";
170+
/**
171+
* 弹出微信相册发图器的事件推送.
172+
*/
158173
public static final String PIC_WEIXIN = "pic_weixin";
174+
/**
175+
* 弹出地理位置选择器的事件推送.
176+
*/
159177
public static final String LOCATION_SELECT = "location_select";
178+
160179
public static final String TEMPLATE_SEND_JOB_FINISH = "TEMPLATESENDJOBFINISH";
161-
public static final String ENTER_AGENT = "enter_agent";
162180
/**
163181
* 微信小店 订单付款通知.
164182
*/
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
package me.chanjar.weixin.cp;
2+
3+
/**
4+
* <pre>
5+
* 企业微信常量
6+
* Created by Binary Wang on 2018/8/25.
7+
* </pre>
8+
*
9+
* @author <a href="https://github.com/binarywang">Binary Wang</a>
10+
*/
11+
public class WxCpConsts {
12+
/**
13+
* 企业微信端推送过来的事件类型.
14+
* 参考文档:https://work.weixin.qq.com/api/doc#12974
15+
*/
16+
public static class EventType {
17+
/**
18+
* 成员关注事件.
19+
*/
20+
public static final String SUBSCRIBE = "subscribe";
21+
22+
/**
23+
* 成员取消关注事件.
24+
*/
25+
public static final String UNSUBSCRIBE = "unsubscribe";
26+
27+
/**
28+
* 进入应用事件.
29+
*/
30+
public static final String ENTER_AGENT = "enter_agent";
31+
32+
/**
33+
* 上报地理位置.
34+
*/
35+
public static final String LOCATION = "LOCATION";
36+
37+
/**
38+
* 异步任务完成事件推送.
39+
*/
40+
public static final String BATCH_JOB_RESULT = "batch_job_result";
41+
42+
/**
43+
* 企业微信通讯录变更事件.
44+
*/
45+
public static final String CHANGE_CONTACT = "change_contact";
46+
47+
/**
48+
* 点击菜单拉取消息的事件推送.
49+
*/
50+
public static final String CLICK = "click";
51+
52+
/**
53+
* 点击菜单跳转链接的事件推送.
54+
*/
55+
public static final String VIEW = "view";
56+
57+
/**
58+
* 扫码推事件的事件推送.
59+
*/
60+
public static final String SCANCODE_PUSH = "scancode_push";
61+
62+
/**
63+
* 扫码推事件且弹出“消息接收中”提示框的事件推送.
64+
*/
65+
public static final String SCANCODE_WAITMSG = "scancode_waitmsg";
66+
67+
/**
68+
* 弹出系统拍照发图的事件推送.
69+
*/
70+
public static final String PIC_SYSPHOTO = "pic_sysphoto";
71+
72+
/**
73+
* 弹出拍照或者相册发图的事件推送.
74+
*/
75+
public static final String PIC_PHOTO_OR_ALBUM = "pic_photo_or_album";
76+
77+
/**
78+
* 弹出微信相册发图器的事件推送.
79+
*/
80+
public static final String PIC_WEIXIN = "pic_weixin";
81+
82+
/**
83+
* 弹出地理位置选择器的事件推送.
84+
*/
85+
public static final String LOCATION_SELECT = "location_select";
86+
87+
}
88+
89+
/**
90+
* 企业微信通讯录变更事件.
91+
*/
92+
public static class ContactChangeType {
93+
/**
94+
* 新增成员事件.
95+
*/
96+
public static final String CREATE_USER = "create_user";
97+
98+
/**
99+
* 更新成员事件.
100+
*/
101+
public static final String UPDATE_USER = "update_user";
102+
103+
/**
104+
* 删除成员事件.
105+
*/
106+
public static final String DELETE_USER = "delete_user";
107+
108+
/**
109+
* 新增部门事件.
110+
*/
111+
public static final String CREATE_PARTY = "create_party";
112+
113+
/**
114+
* 更新部门事件.
115+
*/
116+
public static final String UPDATE_PARTY = "update_party";
117+
118+
/**
119+
* 删除部门事件.
120+
*/
121+
public static final String DELETE_PARTY = "delete_party";
122+
123+
/**
124+
* 标签成员变更事件.
125+
*/
126+
public static final String UPDATE_TAG = "update_tag";
127+
128+
}
129+
}

0 commit comments

Comments
 (0)