WithdrawBean.java 3.02 KB
package com.glsx.usedcar.export;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.github.binarywang.wxpay.constant.WxPayConstants;
import com.glsx.usedcar.export.converter.AuditStateConverter;
import com.glsx.usedcar.export.converter.WithdrawStateConverter;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.finance.entity.Withdraw;
import com.glsx.usedcar.module.meta.AuditState;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.summerframework.orm.validator.CreateValidGroup;
import org.summerframework.orm.validator.UpdateValidGroup;

import java.time.LocalDateTime;

import static jakarta.persistence.GenerationType.IDENTITY;

@Data
public class WithdrawBean {

    /**
     * WITHDRAW_ID
     */

    @ExcelIgnore
    private int withdrawId;

    @ExcelProperty("用户名")
    private String accountName;


    @ExcelProperty("手机号")
    private String mobile;


    @ExcelProperty("流水号")
    private String withdrawCode;


    @ExcelProperty("审核备注")
    private String auditRemark;


    @ExcelProperty("申请时间")
    private LocalDateTime applyWithdrawTime;


    @ExcelProperty("审核时间")
    private LocalDateTime auditTime;


    @ExcelProperty("提现金额")
    private double amount;


    @ExcelProperty(value = "审核状态", converter = AuditStateConverter.class)
    private AuditState auditState;


    @ExcelProperty("付款单号")
    private String transferBillNo;

    @ExcelProperty(value = "付款状态", converter = WithdrawStateConverter.class)
    private String state;

    @ExcelProperty("失败原因")
    private String failReason;


    @ExcelProperty("付款金额")
    private Double paymentAmount;


    @ExcelProperty("发起付款时间")
    private LocalDateTime paymentTime;

    @ExcelProperty("转账成功时间")
    private LocalDateTime transferTime;


    @ExcelProperty("付款备注")
    private String transferRemark;

    public WithdrawBean(Withdraw withdraw) {
        this.withdrawId = withdraw.getWithdrawId();
        this.accountName = withdraw.getAccount().getAccountName();
        this.mobile = withdraw.getAccount().getMobile();
        this.withdrawCode = withdraw.getWithdrawCode();
        this.auditRemark = withdraw.getAuditRemark();
        this.applyWithdrawTime = withdraw.getApplyWithdrawTime();
        this.auditTime = withdraw.getAuditTime();
        this.amount = withdraw.getAmount();
        this.auditState = withdraw.getAuditState();
        this.transferBillNo = withdraw.getTransferBillNo();
        this.state = withdraw.getState();
        this.failReason = withdraw.getFailReason();
        this.paymentAmount = withdraw.getPaymentAmount();
        this.paymentTime = withdraw.getPaymentTime();
        this.transferTime = withdraw.getTransferTime();
        this.transferRemark = withdraw.getTransferRemark();
    }


}