1 package com.foxinmy.weixin4j.payment.mch;
2
3 import java.util.Date;
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.util.DateUtil;
12
13
14
15
16
17
18
19
20
21
22
23 @Deprecated
24 @XmlRootElement
25 @XmlAccessorType(XmlAccessType.FIELD)
26 public class RedpacketSendResult extends MerchantResult {
27
28 private static final long serialVersionUID = 5611847899634131711L;
29
30
31
32 @XmlElement(name = "mch_billno")
33 @JSONField(name = "mch_billno")
34 private String outTradeNo;
35
36
37
38 @XmlElement(name = "re_openid")
39 @JSONField(name = "re_openid")
40 private String openId;
41
42
43
44 @XmlElement(name = "total_amount")
45 @JSONField(name = "total_amount")
46 private int totalAmount;
47
48
49
50 @XmlElement(name = "send_time")
51 @JSONField(name = "send_time")
52 private String sendTime;
53
54
55
56 @XmlElement(name = "send_listid")
57 @JSONField(name = "send_listid")
58 private String sendListid;
59
60 protected RedpacketSendResult() {
61
62 }
63
64 public String getOutTradeNo() {
65 return outTradeNo;
66 }
67
68 public String getOpenId() {
69 return openId;
70 }
71
72 public int getTotalAmount() {
73 return totalAmount;
74 }
75
76
77
78
79
80
81 @JSONField(serialize = false)
82 public double getFormatTotalAmount() {
83 return totalAmount / 100d;
84 }
85
86 public String getSendTime() {
87 return sendTime;
88 }
89
90 @JSONField(serialize = false)
91 public Date getFormatSendTime() {
92 return DateUtil.parse2yyyyMMddHHmmss(sendTime);
93 }
94
95 public String getSendListid() {
96 return sendListid;
97 }
98
99 @Override
100 public String toString() {
101 return "RedpacketSendResult [outTradeNo=" + outTradeNo + ", openId="
102 + openId + ", totalAmount=" + totalAmount + ", "
103 + super.toString() + "]";
104 }
105 }