View Javadoc
1   package com.zone.weixin4j.message.event;
2   
3   import javax.xml.bind.annotation.XmlElement;
4   import java.io.Serializable;
5   
6   /**
7    * 扫码推事件(scancode_push|scancode_waitmsg)
8    * 
9    * @className MenuScanEventMessage
10   * @author jinyu(foxinmy@gmail.com)
11   * @date 2014年9月30日
12   * @since JDK 1.6
13   * @see <a
14   *      href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140454&token=&lang=zh_CN">订阅号、服务号的扫码推事件</a>
15   * @see <a
16   *      href="http://qydev.weixin.qq.com/wiki/index.php?title=%E6%8E%A5%E6%94%B6%E4%BA%8B%E4%BB%B6#.E6.89.AB.E7.A0.81.E6.8E.A8.E4.BA.8B.E4.BB.B6.E7.9A.84.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81">企业号的的扫码推事件</a>
17   */
18  public class MenuScanEventMessage extends MenuEventMessage {
19  
20  	private static final long serialVersionUID = 3142350663022709730L;
21  
22  	/**
23  	 * 扫描信息
24  	 */
25  	@XmlElement(name = "ScanCodeInfo")
26  	private ScanInfo scanInfo;
27  
28  	public ScanInfo getScanInfo() {
29  		return scanInfo;
30  	}
31  
32  	/**
33  	 * 扫描信息
34  	 * 
35  	 * @className ScanInfo
36  	 * @author jinyu(foxinmy@gmail.com)
37  	 * @date 2015年3月29日
38  	 * @since JDK 1.6
39  	 * @see
40  	 */
41  	public static class ScanInfo implements Serializable {
42  
43  		private static final long serialVersionUID = 2237570238164900421L;
44  		/**
45  		 * 扫描类型,一般是qrcode
46  		 */
47  		@XmlElement(name = "ScanType")
48  		private String type;
49  		/**
50  		 * 扫描结果,即二维码对应的字符串信息
51  		 */
52  		@XmlElement(name = "ScanResult")
53  		private String result;
54  
55  		public String getType() {
56  			return type;
57  		}
58  
59  		public String getResult() {
60  			return result;
61  		}
62  
63  		@Override
64  		public String toString() {
65  			return "ScanInfo [type=" + type + ", result=" + result + "]";
66  		}
67  	}
68  
69  	@Override
70  	public String toString() {
71  		return "MenuScanEventMessage [scanInfo=" + scanInfo + ", "
72  				+ super.toString() + "]";
73  	}
74  }