1 package com.foxinmy.weixin4j.pay.payment.mch;
2
3 import com.alibaba.fastjson.annotation.JSONField;
4 import com.foxinmy.weixin4j.pay.type.CurrencyType;
5
6 import javax.xml.bind.annotation.XmlElement;
7
8
9
10
11
12
13
14
15
16
17 public class MerchantTradeResult extends MerchantResult {
18
19 private static final long serialVersionUID = 4205906286092873877L;
20
21
22
23 @XmlElement(name = "transaction_id")
24 @JSONField(name = "transaction_id")
25 private String transactionId;
26
27
28
29 @XmlElement(name = "out_trade_no")
30 @JSONField(name = "out_trade_no")
31 private String outTradeNo;
32
33
34
35 @XmlElement(name = "total_fee")
36 @JSONField(name = "total_fee")
37 private Integer totalFee;
38
39
40
41 @XmlElement(name = "settlement_total_fee")
42 @JSONField(name = "settlement_total_fee")
43 private Integer settlementTotalFee;
44
45
46
47
48
49 @XmlElement(name = "fee_type")
50 @JSONField(name = "fee_type")
51 private String feeType;
52
53
54
55 @XmlElement(name = "cash_fee")
56 @JSONField(name = "cash_fee")
57 private Integer cashFee;
58
59 public Integer getCashFee() {
60 return cashFee;
61 }
62
63 public void setCashFee(Integer cashFee) {
64 this.cashFee = cashFee;
65 }
66
67
68
69
70
71
72 @JSONField(serialize = false)
73 public double getFormatCashFee() {
74 return cashFee != null ? cashFee / 100d : 0d;
75 }
76
77 public Integer getTotalFee() {
78 return totalFee;
79 }
80
81 public void setTotalFee(Integer totalFee) {
82 this.totalFee = totalFee;
83 }
84
85
86
87
88
89
90 @JSONField(serialize = false)
91 public double getFormatTotalFee() {
92 return totalFee != null ? totalFee / 100d : 0d;
93 }
94
95 @JSONField(serialize = false)
96 public CurrencyType getFormatFeeType() {
97 return feeType != null ? CurrencyType.valueOf(feeType.toUpperCase())
98 : null;
99 }
100
101 public String getFeeType() {
102 return feeType;
103 }
104
105 public void setFeeType(String feeType) {
106 this.feeType = feeType;
107 }
108
109 public String getTransactionId() {
110 return transactionId;
111 }
112
113 public void setTransactionId(String transactionId) {
114 this.transactionId = transactionId;
115 }
116
117 public String getOutTradeNo() {
118 return outTradeNo;
119 }
120
121 public void setOutTradeNo(String outTradeNo) {
122 this.outTradeNo = outTradeNo;
123 }
124
125 public Integer getSettlementTotalFee() {
126 return settlementTotalFee;
127 }
128
129 public void setSettlementTotalFee(Integer settlementTotalFee) {
130 this.settlementTotalFee = settlementTotalFee;
131 }
132
133
134
135
136
137
138 @JSONField(serialize = false)
139 public double getFormatSettlementTotalFee() {
140 return settlementTotalFee != null ? settlementTotalFee / 100d : 0d;
141 }
142
143 @Override
144 public String toString() {
145 return "transactionId=" + transactionId + ", outTradeNo=" + outTradeNo
146 + ", totalFee=" + totalFee + ", cashFee=" + cashFee
147 + ", feeType=" + feeType + ", settlementTotalFee="
148 + settlementTotalFee + ", " + super.toString();
149 }
150 }