package com.ycwl.basic.pay.entity;

import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.math.BigInteger;

@Data
@Accessors(chain = true)
public class RefundOrderRequest {
    private Integer price;
    private Integer refundPrice;
    private String orderNo;
    private String refundNo;
    private String notifyUrl;

    public BigDecimal getRefundPriceInYuan() {
        return new BigDecimal(BigInteger.valueOf(refundPrice), 2);
    }

    public void setRefundPriceInYuan(BigDecimal refundPriceInYuan) {
        this.refundPrice = refundPriceInYuan.multiply(BigDecimal.valueOf(100)).intValue();
    }
}
