DepositRefundBean.java
4.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
package com.glsx.usedcar.export;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.glsx.usedcar.export.converter.RefundStateConverter;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.finance.entity.Deposit;
import com.glsx.usedcar.module.vehicle.entity.BaseInfo;
import jakarta.persistence.Column;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Objects;
@Data
public class DepositRefundBean {
@ExcelProperty("用户ID")
@ColumnWidth(10)
private int accountId;
@ExcelProperty("用户手机号")
@ColumnWidth(20)
private String mobile;
@ExcelProperty("用户昵称")
@ColumnWidth(20)
private String nickName;
@ExcelProperty("拍场ID")
@ColumnWidth(10)
private int auctionId;
@ExcelProperty("拍场名称")
@ColumnWidth(30)
private String auctionName;
@ExcelProperty("参拍车源号")
@ColumnWidth(20)
private String sourceNo;
@ExcelProperty("参拍车型名称")
@ColumnWidth(30)
private String carTypeName;
@ExcelProperty("商户订单号")
@ColumnWidth(25)
private String outTradeNo;
@ExcelProperty("微信支付订单号")
@ColumnWidth(25)
private String transactionId;
@ExcelProperty("支付金额(元)")
@ColumnWidth(15)
private double transactionAmount;
@ExcelProperty("支付状态")
@ColumnWidth(15)
private String paymentState;
@ExcelProperty("支付时间")
@ColumnWidth(20)
private LocalDateTime paymentTime;
@ExcelProperty("支付渠道")
@ColumnWidth(15)
private String paymentType;
@ExcelProperty("是否中拍")
@ColumnWidth(15)
private String orderState;
@ExcelProperty(value = "退款状态",converter = RefundStateConverter.class)
@ColumnWidth(15)
private Deposit.RefundState refundState;
@ExcelProperty("退款类型")
@ColumnWidth(15)
private String refundType;
@ExcelProperty("退款金额(元)")
@ColumnWidth(15)
private double refundAmount;
@ExcelProperty("微信退款订单号")
@ColumnWidth(25)
private String outRefundNo;
@ExcelProperty("退款申请时间")
@ColumnWidth(20)
private LocalDateTime refundTime;
@ExcelProperty("退款成功时间")
@ColumnWidth(20)
private LocalDateTime refundSuccessTime;
@ExcelProperty("手动退款备注")
@ColumnWidth(35)
private String refundRemark;
@ExcelProperty("退款操作人")
@ColumnWidth(15)
private String refundOperator;
public DepositRefundBean(Deposit deposit) {
Account account = deposit.getAccount();
this.accountId = account.getAccountId();
this.mobile = account.getMobile();
this.nickName = account.getNickName();
this.auctionId = deposit.getAuctionVehicle().getAuction().getAuctionId();
this.auctionName = deposit.getAuctionVehicle().getAuction().getAuctionName();
BaseInfo baseInfo = deposit.getAuctionVehicle().getVehicle().getBaseInfo();
this.sourceNo = baseInfo.getSourceNo();
this.carTypeName = baseInfo.getCarSeriesName() + " "+baseInfo.getCarTypeName();
// this.outTradeNo = deposit.getOutTradeNo();
// this.transactionId = deposit.getTransactionId();
// this.transactionAmount = Math.abs(deposit.getTransaction().getAmount());
// this.paymentState = Objects.nonNull(deposit.getPaymentTime()) ? "已支付" : "已关闭";
// this.paymentTime = deposit.getPaymentTime();
// this.paymentType = "微信支付";
// this.orderState = Objects.nonNull(deposit.getAuctionOrder()) ? "是" : "否";
// this.refundType = deposit.getRefundType();
// this.refundAmount = Objects.nonNull(deposit.getRefundSuccessTime()) ? deposit.getAmount() : 0;
// this.outRefundNo = deposit.getOutRefundNo();
// this.refundTime = deposit.getRefundTime();
// this.refundSuccessTime = deposit.getRefundSuccessTime();
// this.refundState = deposit.getRefundState();
// this.refundRemark = deposit.getRefundRemark();
// this.refundOperator = deposit.getRefundOperator();
}
}