View Javadoc
1   package com.foxinmy.weixin4j.payment.mch;
2   
3   import java.util.List;
4   
5   import javax.xml.bind.annotation.XmlAccessType;
6   import javax.xml.bind.annotation.XmlAccessorType;
7   import javax.xml.bind.annotation.XmlElement;
8   import javax.xml.bind.annotation.XmlRootElement;
9   
10  import com.alibaba.fastjson.annotation.JSONField;
11  import com.foxinmy.weixin4j.xml.ListsuffixResult;
12  
13  /**
14   * 退款记录
15   * 
16   * @className RefundRecord
17   * @author jinyu(foxinmy@gmail.com)
18   * @date 2014年11月1日
19   * @since JDK 1.6
20   * @deprecated 迁移到子模块weixin4j-pay
21   */
22  @Deprecated
23  @XmlRootElement
24  @XmlAccessorType(XmlAccessType.FIELD)
25  public class RefundRecord extends MerchantTradeResult {
26  
27  	private static final long serialVersionUID = -2971132874939642721L;
28  	/**
29  	 * 退款笔数
30  	 */
31  	@XmlElement(name = "refund_count")
32  	@JSONField(name = "refund_count")
33  	private int refundCount;
34  	/**
35  	 * 退款总金额,单位为分,可以做部分退款
36  	 */
37  	@XmlElement(name = "refund_fee")
38  	@JSONField(name = "refund_fee")
39  	private int refundFee;
40  	/**
41  	 * 退款详情
42  	 * 
43  	 * @see RefundDetail
44  	 */
45  	@ListsuffixResult({ ".*(_\\d)$" })
46  	private List<RefundDetail> refundList;
47  
48  	protected RefundRecord() {
49  		// jaxb required
50  	}
51  
52  	public int getRefundCount() {
53  		return refundCount;
54  	}
55  
56  	public int getRefundFee() {
57  		return refundFee;
58  	}
59  
60  	/**
61  	 * <font color="red">调用接口获取单位为分,get方法转换为元方便使用</font>
62  	 * 
63  	 * @return 元单位
64  	 */
65  	@JSONField(serialize = false)
66  	public double getFormatRefundFee() {
67  		return refundFee / 100d;
68  	}
69  
70  	public List<RefundDetail> getRefundList() {
71  		return refundList;
72  	}
73  
74  	public void setRefundList(List<RefundDetail> refundList) {
75  		this.refundList = refundList;
76  	}
77  
78  	@Override
79  	public String toString() {
80  		return "RefundRecord [refundCount=" + refundCount + ", refundFee="
81  				+ refundFee + ", refundList=" + refundList + ", "
82  				+ super.toString() + "]";
83  	}
84  }