View Javadoc
1   package com.foxinmy.weixin4j.payment.coupon;
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   import com.foxinmy.weixin4j.payment.mch.MerchantResult;
10  
11  /**
12   * 代金券发放结果
13   * 
14   * @className CouponResult
15   * @author jinyu(foxinmy@gmail.com)
16   * @date 2015年3月25日
17   * @since JDK 1.6
18   * @see
19   * @deprecated 迁移到子模块weixin4j-pay
20   */
21  @Deprecated
22  @XmlRootElement
23  @XmlAccessorType(XmlAccessType.FIELD)
24  public class CouponResult extends MerchantResult {
25  
26  	private static final long serialVersionUID = -1996967923720149124L;
27  
28  	/**
29  	 * 代金券批次id
30  	 */
31  	@XmlElement(name = "coupon_stock_id")
32  	@JSONField(name = "coupon_stock_id")
33  	private String couponStockId;
34  	/**
35  	 * 返回记录数
36  	 */
37  	@XmlElement(name = "resp_count")
38  	@JSONField(name = "resp_count")
39  	private int responseCount;
40  	/**
41  	 * 成功记录数
42  	 */
43  	@XmlElement(name = "success_count")
44  	@JSONField(name = "success_count")
45  	private int successCount;
46  	/**
47  	 * 失败记录数
48  	 */
49  	@XmlElement(name = "failed_count")
50  	@JSONField(name = "failed_count")
51  	private int failedCount;
52  	/**
53  	 * 用户在商户appid下的唯一标识
54  	 */
55  	@XmlElement(name = "openid")
56  	@JSONField(name = "openid")
57  	private String openId;
58  	/**
59  	 * 返回码 SUCCESS或者FAILED
60  	 */
61  	@XmlElement(name = "ret_code")
62  	@JSONField(name = "ret_code")
63  	private String retCode;
64  	/**
65  	 * 代金券id
66  	 */
67  	@XmlElement(name = "coupon_id")
68  	@JSONField(name = "coupon_id")
69  	private String couponId;
70  	/**
71  	 * 失败描述信息,例如:“用户已达领用上限”
72  	 */
73  	@XmlElement(name = "ret_msg")
74  	@JSONField(name = "ret_msg")
75  	private String retMsg;
76  
77  	public CouponResult() {
78  
79  	}
80  
81  	public String getCouponStockId() {
82  		return couponStockId;
83  	}
84  
85  	public int getResponseCount() {
86  		return responseCount;
87  	}
88  
89  	public int getSuccessCount() {
90  		return successCount;
91  	}
92  
93  	public int getFailedCount() {
94  		return failedCount;
95  	}
96  
97  	public String getOpenId() {
98  		return openId;
99  	}
100 
101 	public String getRetCode() {
102 		return retCode;
103 	}
104 
105 	public String getCouponId() {
106 		return couponId;
107 	}
108 
109 	public String getRetMsg() {
110 		return retMsg;
111 	}
112 
113 	@Override
114 	public String toString() {
115 		return "CouponResult [couponStockId=" + couponStockId
116 				+ ", responseCount=" + responseCount + ", successCount="
117 				+ successCount + ", failedCount=" + failedCount + ", openId="
118 				+ openId + ", retCode=" + retCode + ", couponId=" + couponId
119 				+ ", retMsg=" + retMsg + "]";
120 	}
121 }