Browse Source

#309 企业微信新增常量类WxCpConsts,存放包含事件类型在内的一些常量

master
Binary Wang 6 years ago
parent
commit
6e75ca258b
2 changed files with 148 additions and 1 deletions
  1. +19
    -1
      weixin-java-common/src/main/java/me/chanjar/weixin/common/api/WxConsts.java
  2. +129
    -0
      weixin-java-cp/src/main/java/me/chanjar/weixin/cp/WxCpConsts.java

+ 19
- 1
weixin-java-common/src/main/java/me/chanjar/weixin/common/api/WxConsts.java View File

@@ -151,14 +151,32 @@ public class WxConsts {
public static final String CLICK = "CLICK";
public static final String VIEW = "VIEW";
public static final String MASS_SEND_JOB_FINISH = "MASSSENDJOBFINISH";
/**
* 扫码推事件的事件推送
*/
public static final String SCANCODE_PUSH = "scancode_push";
/**
* 扫码推事件且弹出“消息接收中”提示框的事件推送.
*/
public static final String SCANCODE_WAITMSG = "scancode_waitmsg";
/**
* 弹出系统拍照发图的事件推送.
*/
public static final String PIC_SYSPHOTO = "pic_sysphoto";
/**
* 弹出拍照或者相册发图的事件推送.
*/
public static final String PIC_PHOTO_OR_ALBUM = "pic_photo_or_album";
/**
* 弹出微信相册发图器的事件推送.
*/
public static final String PIC_WEIXIN = "pic_weixin";
/**
* 弹出地理位置选择器的事件推送.
*/
public static final String LOCATION_SELECT = "location_select";

public static final String TEMPLATE_SEND_JOB_FINISH = "TEMPLATESENDJOBFINISH";
public static final String ENTER_AGENT = "enter_agent";
/**
* 微信小店 订单付款通知.
*/


+ 129
- 0
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/WxCpConsts.java View File

@@ -0,0 +1,129 @@
package me.chanjar.weixin.cp;

/**
* <pre>
* 企业微信常量
* Created by Binary Wang on 2018/8/25.
* </pre>
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
*/
public class WxCpConsts {
/**
* 企业微信端推送过来的事件类型.
* 参考文档:https://work.weixin.qq.com/api/doc#12974
*/
public static class EventType {
/**
* 成员关注事件.
*/
public static final String SUBSCRIBE = "subscribe";

/**
* 成员取消关注事件.
*/
public static final String UNSUBSCRIBE = "unsubscribe";

/**
* 进入应用事件.
*/
public static final String ENTER_AGENT = "enter_agent";

/**
* 上报地理位置.
*/
public static final String LOCATION = "LOCATION";

/**
* 异步任务完成事件推送.
*/
public static final String BATCH_JOB_RESULT = "batch_job_result";

/**
* 企业微信通讯录变更事件.
*/
public static final String CHANGE_CONTACT = "change_contact";

/**
* 点击菜单拉取消息的事件推送.
*/
public static final String CLICK = "click";

/**
* 点击菜单跳转链接的事件推送.
*/
public static final String VIEW = "view";

/**
* 扫码推事件的事件推送.
*/
public static final String SCANCODE_PUSH = "scancode_push";

/**
* 扫码推事件且弹出“消息接收中”提示框的事件推送.
*/
public static final String SCANCODE_WAITMSG = "scancode_waitmsg";

/**
* 弹出系统拍照发图的事件推送.
*/
public static final String PIC_SYSPHOTO = "pic_sysphoto";

/**
* 弹出拍照或者相册发图的事件推送.
*/
public static final String PIC_PHOTO_OR_ALBUM = "pic_photo_or_album";

/**
* 弹出微信相册发图器的事件推送.
*/
public static final String PIC_WEIXIN = "pic_weixin";

/**
* 弹出地理位置选择器的事件推送.
*/
public static final String LOCATION_SELECT = "location_select";

}

/**
* 企业微信通讯录变更事件.
*/
public static class ContactChangeType {
/**
* 新增成员事件.
*/
public static final String CREATE_USER = "create_user";

/**
* 更新成员事件.
*/
public static final String UPDATE_USER = "update_user";

/**
* 删除成员事件.
*/
public static final String DELETE_USER = "delete_user";

/**
* 新增部门事件.
*/
public static final String CREATE_PARTY = "create_party";

/**
* 更新部门事件.
*/
public static final String UPDATE_PARTY = "update_party";

/**
* 删除部门事件.
*/
public static final String DELETE_PARTY = "delete_party";

/**
* 标签成员变更事件.
*/
public static final String UPDATE_TAG = "update_tag";

}
}

Loading…
Cancel
Save