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