Skip to content

Commit f54097e

Browse files
committed
添加微信认证事件推送消息的支持,包括常量的定义以及接收消息字段的定义。 finish #63
1 parent acc1291 commit f54097e

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public class WxConsts {
6363
* 群发反馈消息代码所对应的文字描述
6464
*/
6565
public static final Map<String, String> MASS_ST_2_DESC = new HashMap<>();
66+
6667
///////////////////////
6768
// 微信端推送过来的事件类型
6869
///////////////////////
@@ -94,6 +95,31 @@ public class WxConsts {
9495
public static final String EVT_KF_CLOSE_SESSION = "kf_close_session"; // 客服关闭会话
9596
public static final String EVT_KF_SWITCH_SESSION = "kf_switch_session"; // 客服转接会话
9697
public static final String EVT_POI_CHECK_NOTIFY = "poi_check_notify"; //门店审核事件推送
98+
//以下为微信认证事件
99+
/**
100+
* 资质认证成功
101+
*/
102+
public static final String EVT_QUALIFICATION_VERIFY_SUCCESS = "qualification_verify_success";
103+
/**
104+
* 资质认证失败
105+
*/
106+
public static final String EVT_QUALIFICATION_VERIFY_FAIL = "qualification_verify_fail";
107+
/**
108+
* 名称认证成功
109+
*/
110+
public static final String EVT_NAMING_VERIFY_SUCCESS = "naming_verify_success";
111+
/**
112+
* 名称认证失败
113+
*/
114+
public static final String EVT_NAMING_VERIFY_FAIL = "naming_verify_fail";
115+
/**
116+
* 年审通知
117+
*/
118+
public static final String EVT_ANNUAL_RENEW = "annual_renew";
119+
/**
120+
* 认证过期失效通知
121+
*/
122+
public static final String EVT_VERIFY_EXPIRED = "verify_expired";
97123

98124
///////////////////////
99125
// 上传多媒体文件的类型

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/WxMpXmlMessage.java

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,54 @@ public class WxMpXmlMessage implements Serializable {
239239
@XStreamAlias("msg")
240240
private String msg;
241241

242+
///////////////////////////////////////
243+
// 微信认证事件推送
244+
///////////////////////////////////////
245+
/**
246+
* ExpiredTime
247+
* 资质认证成功/名称认证成功: 有效期 (整形),指的是时间戳,将于该时间戳认证过期
248+
* 年审通知: 有效期 (整形),指的是时间戳,将于该时间戳认证过期,需尽快年审
249+
* 认证过期失效通知: 有效期 (整形),指的是时间戳,表示已于该时间戳认证过期,需要重新发起微信认证
250+
*/
251+
@XStreamAlias("ExpiredTime")
252+
private Long expiredTime;
253+
/**
254+
* FailTime
255+
* 失败发生时间 (整形),时间戳
256+
*/
257+
@XStreamAlias("FailTime")
258+
private Long failTime;
259+
/**
260+
* FailReason
261+
* 认证失败的原因
262+
*/
263+
@XStreamAlias("FailReason")
264+
private String failReason;
265+
266+
public Long getExpiredTime() {
267+
return this.expiredTime;
268+
}
269+
270+
public void setExpiredTime(Long expiredTime) {
271+
this.expiredTime = expiredTime;
272+
}
273+
274+
public Long getFailTime() {
275+
return this.failTime;
276+
}
277+
278+
public void setFailTime(Long failTime) {
279+
this.failTime = failTime;
280+
}
281+
282+
public String getFailReason() {
283+
return this.failReason;
284+
}
285+
286+
public void setFailReason(String failReason) {
287+
this.failReason = failReason;
288+
}
289+
242290
public String getStoreUniqId() {
243291
return this.storeUniqId;
244292
}

0 commit comments

Comments
 (0)