matrix.business.pay.converter.RefundEntityConvert Maven / Gradle / Ivy
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;
}
}