All Downloads are FREE. Search and download functionalities are using the official Maven repository.

matrix.business.pay.converter.RefundEntityConvert Maven / Gradle / Ivy

There is a newer version: 2.1.11
Show newest version
package matrix.business.pay.converter;

import matrix.business.pay.entity.MatrixBusinessRefundEntity;
import matrix.business.pay.dto.RefundDto;

/**
 * 退款实体转换
 *
 * @author wangcheng
 */
public class RefundEntityConvert {

    /**
     * 转换
     *
     * @param typeCode 类型编码
     * @param refundVo 退款参数
     * @param orderId  订单号
     * @param status   状态
     * @return 退款实体
     */
    public static MatrixBusinessRefundEntity convert(String typeCode, RefundDto refundVo, String orderId, Integer status) {
        MatrixBusinessRefundEntity refundEntity = new MatrixBusinessRefundEntity()
                .setRefundId(refundVo.getRefundId())
                .setRefundPrice(refundVo.getRefundAmount())
                .setPayId(refundVo.getPayId())
                .setOrderId(orderId);
        refundEntity.setTypeCode(typeCode);
        refundEntity.setStatus(status);
        return refundEntity;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy