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 CorpPaymentResult extends MerchantResult {
24
25 private static final long serialVersionUID = 1110472826089211646L;
26
27
28
29
30 @JSONField(name = "payment_no")
31 @XmlElement(name = "payment_no")
32 private String transactionId;
33
34
35
36 @JSONField(name = "partner_trade_no")
37 @XmlElement(name = "partner_trade_no")
38 private String outTradeNo;
39
40
41
42 @JSONField(name = "payment_time")
43 @XmlElement(name = "payment_time")
44 private String paymentTime;
45
46 protected CorpPaymentResult() {
47
48 }
49
50 public String getTransactionId() {
51 return transactionId;
52 }
53
54 public void setTransactionId(String transactionId) {
55 this.transactionId = transactionId;
56 }
57
58 public String getOutTradeNo() {
59 return outTradeNo;
60 }
61
62 public void setOutTradeNo(String outTradeNo) {
63 this.outTradeNo = outTradeNo;
64 }
65
66 public String getPaymentTime() {
67 return paymentTime;
68 }
69
70 public void setPaymentTime(String paymentTime) {
71 this.paymentTime = paymentTime;
72 }
73
74 @JSONField(serialize = false)
75 public Date getFormatPaymentTime() {
76 return paymentTime != null ? DateUtil.parseDate(paymentTime,
77 "yyyy-MM-dd HH:mm:ss") : null;
78 }
79
80 @Override
81 public String toString() {
82 return "CorpPaymentResult [transactionId=" + transactionId
83 + ", outTradeNo=" + outTradeNo + ", paymentTime=" + paymentTime
84 + ", " + super.toString() + "]";
85 }
86 }