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