DepositBean.java
1.94 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
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.DepositStateConverter;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.auction.entity.AuctionVehicle;
import com.glsx.usedcar.module.finance.entity.Deposit;
import com.glsx.usedcar.module.finance.entity.Transaction;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import static jakarta.persistence.GenerationType.IDENTITY;
@Data
public class DepositBean {
private int depositId;
@ExcelProperty("用户名")
private String accountName;
@ExcelProperty("手机号")
private String mobile;
@ExcelProperty("车源号")
@ColumnWidth(30)
private String sourceNo;
@ExcelProperty("车系名字")
@ColumnWidth(15)
private String carSeriesName;
@ExcelProperty("车型名称")
@ColumnWidth(30)
private String carTypeName;
@ExcelProperty("订单号")
private String orderCode;
@ExcelProperty("保证金金额")
private double amount;
@ExcelProperty(value = "保证金状态", converter = DepositStateConverter.class)
private Deposit.DepositState depositState;
public DepositBean(Deposit deposit) {
this.depositId = deposit.getDepositId();
this.accountName = deposit.getAccount().getAccountName();
this.mobile = deposit.getAccount().getMobile();
this.sourceNo = deposit.getAuctionVehicle().getVehicle().getBaseInfo().getSourceNo();
this.carSeriesName = deposit.getAuctionVehicle().getVehicle().getBaseInfo().getCarSeriesName();
this.carTypeName = deposit.getAuctionVehicle().getVehicle().getBaseInfo().getCarTypeName();
this.orderCode = deposit.getOrderCode();
this.amount = deposit.getAmount();
this.depositState = deposit.getDepositState();
}
}