View Javadoc
1   package com.foxinmy.weixin4j.payment;
2   
3   import javax.xml.bind.annotation.XmlAccessType;
4   import javax.xml.bind.annotation.XmlAccessorType;
5   import javax.xml.bind.annotation.XmlElement;
6   import javax.xml.bind.annotation.XmlRootElement;
7   
8   import com.alibaba.fastjson.annotation.JSONField;
9   
10  /**
11   * JSAPI支付回调时的POST信息
12   * 
13   * @className JsPayNotify
14   * @author jinyu(foxinmy@gmail.com)
15   * @date 2014年8月19日
16   * @since JDK 1.6
17   * @see
18   * @deprecated 迁移到子模块weixin4j-pay
19   */
20  @Deprecated
21  @XmlRootElement
22  @XmlAccessorType(XmlAccessType.FIELD)
23  public class JsPayNotify extends PayBaseInfo {
24  
25  	private static final long serialVersionUID = -4659030958445259803L;
26  
27  	/**
28  	 * 用户的openid
29  	 */
30  	@JSONField(name = "OpenId")
31  	@XmlElement(name = "OpenId")
32  	private String openId;
33  	/**
34  	 * 是否关注公众号
35  	 */
36  	@JSONField(name = "IsSubscribe")
37  	@XmlElement(name = "IsSubscribe")
38  	private int isSubscribe;
39  
40  	public JsPayNotify() {
41  
42  	}
43  
44  	public String getOpenId() {
45  		return openId;
46  	}
47  
48  	public int getIsSubscribe() {
49  		return isSubscribe;
50  	}
51  
52  	@JSONField(serialize = false)
53  	public boolean getFormatIsSubscribe() {
54  		return isSubscribe == 1;
55  	}
56  
57  	@Override
58  	public String toString() {
59  		return "openId=" + openId + ", isSubscribe=" + getFormatIsSubscribe()
60  				+ ", " + super.toString();
61  	}
62  }