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