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

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
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("用户名")
    @ColumnWidth(15)
    private String accountName;


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


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


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


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


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


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


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


    @ExcelProperty("已退款金额")
    @ColumnWidth(15)
    private Double refundAmount;


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

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


    @ExcelProperty("付款备注")
    @ColumnWidth(30)
    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.refundAmount = withdraw.getRefundAmount();
//        this.paymentTime = withdraw.getPaymentTime();
        this.transferTime = withdraw.getTransferTime();
        this.transferRemark = withdraw.getTransferRemark();
    }


}