1 package com.foxinmy.weixin4j.pay.payment.mch;
2
3 import com.alibaba.fastjson.annotation.JSONField;
4 import com.foxinmy.weixin4j.util.DateUtil;
5
6 import javax.xml.bind.annotation.XmlAccessType;
7 import javax.xml.bind.annotation.XmlAccessorType;
8 import javax.xml.bind.annotation.XmlElement;
9 import javax.xml.bind.annotation.XmlRootElement;
10 import java.util.Date;
11
12
13
14
15
16
17
18
19
20
21 @XmlRootElement
22 @XmlAccessorType(XmlAccessType.FIELD)
23 public class RedpacketSendResult extends MerchantResult {
24
25 private static final long serialVersionUID = 5611847899634131711L;
26
27
28
29 @XmlElement(name = "mch_billno")
30 @JSONField(name = "mch_billno")
31 private String outTradeNo;
32
33
34
35 @XmlElement(name = "re_openid")
36 @JSONField(name = "re_openid")
37 private String openId;
38
39
40
41 @XmlElement(name = "total_amount")
42 @JSONField(name = "total_amount")
43 private int totalAmount;
44
45
46
47 @XmlElement(name = "send_time")
48 @JSONField(name = "send_time")
49 private String sendTime;
50
51
52
53 @XmlElement(name = "send_listid")
54 @JSONField(name = "send_listid")
55 private String sendListid;
56
57 protected RedpacketSendResult() {
58
59 }
60
61 public String getOutTradeNo() {
62 return outTradeNo;
63 }
64
65 public void setOutTradeNo(String outTradeNo) {
66 this.outTradeNo = outTradeNo;
67 }
68
69 public String getOpenId() {
70 return openId;
71 }
72
73 public void setOpenId(String openId) {
74 this.openId = openId;
75 }
76
77 public int getTotalAmount() {
78 return totalAmount;
79 }
80
81 public void setTotalAmount(int totalAmount) {
82 this.totalAmount = totalAmount;
83 }
84
85
86
87
88
89
90 @JSONField(serialize = false)
91 public double getFormatTotalAmount() {
92 return totalAmount / 100d;
93 }
94
95 public String getSendTime() {
96 return sendTime;
97 }
98
99 public void setSendTime(String sendTime) {
100 this.sendTime = sendTime;
101 }
102
103 @JSONField(serialize = false)
104 public Date getFormatSendTime() {
105 return DateUtil.parse2yyyyMMddHHmmss(sendTime);
106 }
107
108 public String getSendListid() {
109 return sendListid;
110 }
111
112 public void setSendListid(String sendListid) {
113 this.sendListid = sendListid;
114 }
115
116 @Override
117 public String toString() {
118 return "RedpacketSendResult [outTradeNo=" + outTradeNo + ", openId="
119 + openId + ", totalAmount=" + totalAmount + ", "
120 + super.toString() + "]";
121 }
122 }