View Javadoc
1   package com.zone.weixin4j.mp.event;
2   
3   import com.zone.weixin4j.message.event.EventMessage;
4   import com.zone.weixin4j.type.EventType;
5   
6   import javax.xml.bind.annotation.XmlElement;
7   import javax.xml.bind.annotation.XmlTransient;
8   import java.util.Date;
9   
10  /**
11   * 认证通知(资质认证成功/名称认证成功/年审通知/认证过期失效通知)
12   * 
13   * @className VerifyExpireEventMessage
14   * @author jinyu(foxinmy@gmail.com)
15   * @date 2015年10月25日
16   * @since JDK 1.6
17   * @see <a
18   *      href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1455785130&token=&lang=zh_CN">认证事件</a>
19   */
20  public class VerifyExpireEventMessage extends EventMessage {
21  
22  	private static final long serialVersionUID = -4309074299189681095L;
23  
24  	public VerifyExpireEventMessage() {
25  		super(EventType.annual_renew.name());
26  	}
27  
28  	/**
29  	 * 有效期 (整形),指的是时间戳,将于该时间戳认证过期
30  	 */
31  	@XmlElement(name = "EventKey")
32  	private long expiredTime;
33  
34  	public long getExpiredTime() {
35  		return expiredTime;
36  	}
37  
38  	@XmlTransient
39  	public Date getFormatExpiredTime() {
40  		return new Date(expiredTime * 1000l);
41  	}
42  
43  	@Override
44  	public String toString() {
45  		return "VerifyExpireEventMessage [expiredTime=" + expiredTime + ", "
46  				+ super.toString() + "]";
47  	}
48  }