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   /**
9    * 认证失败事件(资质认证失败/名称认证失败)
10   * 
11   * @className VerifyFailEventMessage
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2015年10月25日
14   * @since JDK 1.6
15   * @see <a href=
16   *      "https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1455785130&token=&lang=zh_CN">
17   *      认证事件</a>
18   */
19  public class VerifyFailEventMessage extends VerifyExpireEventMessage {
20  
21  	/**
22  	 * 
23  	 */
24  	private static final long serialVersionUID = 2155899086751787490L;
25  
26  	/**
27  	 * 失败发生时间 (整形),时间戳
28  	 */
29  	@XmlElement(name = "FailTime")
30  	private long failTime;
31  	/**
32  	 * 认证失败的原因
33  	 */
34  	@XmlElement(name = "FailReason")
35  	private String failReason;
36  
37  	public long getFailTime() {
38  		return failTime;
39  	}
40  
41  	@XmlTransient
42  	public Date getFormatFailTime() {
43  		return new Date(failTime * 1000l);
44  	}
45  
46  	public String getFailReason() {
47  		return failReason;
48  	}
49  
50  	@Override
51  	public String toString() {
52  		return "VerifyFailEventMessage [failTime=" + failTime + ", failReason=" + failReason + ", " + super.toString()
53  				+ "]";
54  	}
55  }