package com.jojubanking.boot.module.pay.convert.refund;

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.pay.controller.admin.refund.vo.PayRefundCreateReqVO;
import com.jojubanking.boot.module.pay.controller.admin.refund.vo.PayRefundDetailsRespVO;
import com.jojubanking.boot.module.pay.controller.admin.refund.vo.PayRefundExcelVO;
import com.jojubanking.boot.module.pay.controller.admin.refund.vo.PayRefundPageItemRespVO;
import com.jojubanking.boot.module.pay.controller.admin.refund.vo.PayRefundRespVO;
import com.jojubanking.boot.module.pay.controller.admin.refund.vo.PayRefundUpdateReqVO;
import com.jojubanking.boot.module.pay.controller.app.refund.vo.AppPayRefundReqVO;
import com.jojubanking.boot.module.pay.controller.app.refund.vo.AppPayRefundRespVO;
import com.jojubanking.boot.module.pay.dal.dataobject.order.PayOrderDO;
import com.jojubanking.boot.module.pay.dal.dataobject.refund.PayRefundDO;
import com.jojubanking.boot.module.pay.service.order.dto.PayRefundReqDTO;
import com.jojubanking.boot.module.pay.service.order.dto.PayRefundRespDTO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2025-12-05T11:32:33+0800",
    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_201 (Oracle Corporation)"
)
public class PayRefundConvertImpl implements PayRefundConvert {

    @Override
    public PayRefundDO convert(PayRefundCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        PayRefundDO payRefundDO = new PayRefundDO();

        payRefundDO.setMerchantId( bean.getMerchantId() );
        payRefundDO.setAppId( bean.getAppId() );
        payRefundDO.setChannelId( bean.getChannelId() );
        payRefundDO.setChannelCode( bean.getChannelCode() );
        payRefundDO.setOrderId( bean.getOrderId() );
        payRefundDO.setTradeNo( bean.getTradeNo() );
        payRefundDO.setMerchantOrderId( bean.getMerchantOrderId() );
        payRefundDO.setMerchantRefundNo( bean.getMerchantRefundNo() );
        payRefundDO.setNotifyUrl( bean.getNotifyUrl() );
        payRefundDO.setNotifyStatus( bean.getNotifyStatus() );
        payRefundDO.setStatus( bean.getStatus() );
        payRefundDO.setType( bean.getType() );
        payRefundDO.setPayAmount( bean.getPayAmount() );
        payRefundDO.setRefundAmount( bean.getRefundAmount() );
        payRefundDO.setReason( bean.getReason() );
        payRefundDO.setUserIp( bean.getUserIp() );
        payRefundDO.setChannelOrderNo( bean.getChannelOrderNo() );
        payRefundDO.setChannelRefundNo( bean.getChannelRefundNo() );
        payRefundDO.setChannelErrorCode( bean.getChannelErrorCode() );
        payRefundDO.setChannelErrorMsg( bean.getChannelErrorMsg() );
        payRefundDO.setChannelExtras( bean.getChannelExtras() );
        payRefundDO.setExpireTime( bean.getExpireTime() );
        payRefundDO.setSuccessTime( bean.getSuccessTime() );
        payRefundDO.setNotifyTime( bean.getNotifyTime() );

        return payRefundDO;
    }

    @Override
    public PayRefundDO convert(PayRefundUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        PayRefundDO payRefundDO = new PayRefundDO();

        payRefundDO.setId( bean.getId() );
        payRefundDO.setMerchantId( bean.getMerchantId() );
        payRefundDO.setAppId( bean.getAppId() );
        payRefundDO.setChannelId( bean.getChannelId() );
        payRefundDO.setChannelCode( bean.getChannelCode() );
        payRefundDO.setOrderId( bean.getOrderId() );
        payRefundDO.setTradeNo( bean.getTradeNo() );
        payRefundDO.setMerchantOrderId( bean.getMerchantOrderId() );
        payRefundDO.setMerchantRefundNo( bean.getMerchantRefundNo() );
        payRefundDO.setNotifyUrl( bean.getNotifyUrl() );
        payRefundDO.setNotifyStatus( bean.getNotifyStatus() );
        payRefundDO.setStatus( bean.getStatus() );
        payRefundDO.setType( bean.getType() );
        payRefundDO.setPayAmount( bean.getPayAmount() );
        payRefundDO.setRefundAmount( bean.getRefundAmount() );
        payRefundDO.setReason( bean.getReason() );
        payRefundDO.setUserIp( bean.getUserIp() );
        payRefundDO.setChannelOrderNo( bean.getChannelOrderNo() );
        payRefundDO.setChannelRefundNo( bean.getChannelRefundNo() );
        payRefundDO.setChannelErrorCode( bean.getChannelErrorCode() );
        payRefundDO.setChannelErrorMsg( bean.getChannelErrorMsg() );
        payRefundDO.setChannelExtras( bean.getChannelExtras() );
        payRefundDO.setExpireTime( bean.getExpireTime() );
        payRefundDO.setSuccessTime( bean.getSuccessTime() );
        payRefundDO.setNotifyTime( bean.getNotifyTime() );

        return payRefundDO;
    }

    @Override
    public PayRefundRespVO convert(PayRefundDO bean) {
        if ( bean == null ) {
            return null;
        }

        PayRefundRespVO payRefundRespVO = new PayRefundRespVO();

        payRefundRespVO.setMerchantId( bean.getMerchantId() );
        payRefundRespVO.setAppId( bean.getAppId() );
        payRefundRespVO.setChannelId( bean.getChannelId() );
        payRefundRespVO.setChannelCode( bean.getChannelCode() );
        payRefundRespVO.setOrderId( bean.getOrderId() );
        payRefundRespVO.setTradeNo( bean.getTradeNo() );
        payRefundRespVO.setMerchantOrderId( bean.getMerchantOrderId() );
        payRefundRespVO.setMerchantRefundNo( bean.getMerchantRefundNo() );
        payRefundRespVO.setNotifyUrl( bean.getNotifyUrl() );
        payRefundRespVO.setNotifyStatus( bean.getNotifyStatus() );
        payRefundRespVO.setStatus( bean.getStatus() );
        payRefundRespVO.setType( bean.getType() );
        payRefundRespVO.setPayAmount( bean.getPayAmount() );
        payRefundRespVO.setRefundAmount( bean.getRefundAmount() );
        payRefundRespVO.setReason( bean.getReason() );
        payRefundRespVO.setUserIp( bean.getUserIp() );
        payRefundRespVO.setChannelOrderNo( bean.getChannelOrderNo() );
        payRefundRespVO.setChannelRefundNo( bean.getChannelRefundNo() );
        payRefundRespVO.setChannelErrorCode( bean.getChannelErrorCode() );
        payRefundRespVO.setChannelErrorMsg( bean.getChannelErrorMsg() );
        payRefundRespVO.setChannelExtras( bean.getChannelExtras() );
        payRefundRespVO.setExpireTime( bean.getExpireTime() );
        payRefundRespVO.setSuccessTime( bean.getSuccessTime() );
        payRefundRespVO.setNotifyTime( bean.getNotifyTime() );
        payRefundRespVO.setId( bean.getId() );
        payRefundRespVO.setCreateTime( bean.getCreateTime() );

        return payRefundRespVO;
    }

    @Override
    public PayRefundDetailsRespVO refundDetailConvert(PayRefundDO bean) {
        if ( bean == null ) {
            return null;
        }

        PayRefundDetailsRespVO payRefundDetailsRespVO = new PayRefundDetailsRespVO();

        payRefundDetailsRespVO.setMerchantId( bean.getMerchantId() );
        payRefundDetailsRespVO.setAppId( bean.getAppId() );
        payRefundDetailsRespVO.setChannelId( bean.getChannelId() );
        payRefundDetailsRespVO.setChannelCode( bean.getChannelCode() );
        payRefundDetailsRespVO.setOrderId( bean.getOrderId() );
        payRefundDetailsRespVO.setTradeNo( bean.getTradeNo() );
        payRefundDetailsRespVO.setMerchantOrderId( bean.getMerchantOrderId() );
        payRefundDetailsRespVO.setMerchantRefundNo( bean.getMerchantRefundNo() );
        payRefundDetailsRespVO.setNotifyUrl( bean.getNotifyUrl() );
        payRefundDetailsRespVO.setNotifyStatus( bean.getNotifyStatus() );
        payRefundDetailsRespVO.setStatus( bean.getStatus() );
        payRefundDetailsRespVO.setType( bean.getType() );
        payRefundDetailsRespVO.setPayAmount( bean.getPayAmount() );
        payRefundDetailsRespVO.setRefundAmount( bean.getRefundAmount() );
        payRefundDetailsRespVO.setReason( bean.getReason() );
        payRefundDetailsRespVO.setUserIp( bean.getUserIp() );
        payRefundDetailsRespVO.setChannelOrderNo( bean.getChannelOrderNo() );
        payRefundDetailsRespVO.setChannelRefundNo( bean.getChannelRefundNo() );
        payRefundDetailsRespVO.setChannelErrorCode( bean.getChannelErrorCode() );
        payRefundDetailsRespVO.setChannelErrorMsg( bean.getChannelErrorMsg() );
        payRefundDetailsRespVO.setChannelExtras( bean.getChannelExtras() );
        payRefundDetailsRespVO.setExpireTime( bean.getExpireTime() );
        payRefundDetailsRespVO.setSuccessTime( bean.getSuccessTime() );
        payRefundDetailsRespVO.setNotifyTime( bean.getNotifyTime() );
        payRefundDetailsRespVO.setId( bean.getId() );
        payRefundDetailsRespVO.setCreateTime( bean.getCreateTime() );
        payRefundDetailsRespVO.setUpdateTime( bean.getUpdateTime() );

        return payRefundDetailsRespVO;
    }

    @Override
    public PayRefundPageItemRespVO pageItemConvert(PayRefundDO bean) {
        if ( bean == null ) {
            return null;
        }

        PayRefundPageItemRespVO payRefundPageItemRespVO = new PayRefundPageItemRespVO();

        payRefundPageItemRespVO.setMerchantId( bean.getMerchantId() );
        payRefundPageItemRespVO.setAppId( bean.getAppId() );
        payRefundPageItemRespVO.setChannelId( bean.getChannelId() );
        payRefundPageItemRespVO.setChannelCode( bean.getChannelCode() );
        payRefundPageItemRespVO.setOrderId( bean.getOrderId() );
        payRefundPageItemRespVO.setTradeNo( bean.getTradeNo() );
        payRefundPageItemRespVO.setMerchantOrderId( bean.getMerchantOrderId() );
        payRefundPageItemRespVO.setMerchantRefundNo( bean.getMerchantRefundNo() );
        payRefundPageItemRespVO.setNotifyUrl( bean.getNotifyUrl() );
        payRefundPageItemRespVO.setNotifyStatus( bean.getNotifyStatus() );
        payRefundPageItemRespVO.setStatus( bean.getStatus() );
        payRefundPageItemRespVO.setType( bean.getType() );
        payRefundPageItemRespVO.setPayAmount( bean.getPayAmount() );
        payRefundPageItemRespVO.setRefundAmount( bean.getRefundAmount() );
        payRefundPageItemRespVO.setReason( bean.getReason() );
        payRefundPageItemRespVO.setUserIp( bean.getUserIp() );
        payRefundPageItemRespVO.setChannelOrderNo( bean.getChannelOrderNo() );
        payRefundPageItemRespVO.setChannelRefundNo( bean.getChannelRefundNo() );
        payRefundPageItemRespVO.setChannelErrorCode( bean.getChannelErrorCode() );
        payRefundPageItemRespVO.setChannelErrorMsg( bean.getChannelErrorMsg() );
        payRefundPageItemRespVO.setChannelExtras( bean.getChannelExtras() );
        payRefundPageItemRespVO.setExpireTime( bean.getExpireTime() );
        payRefundPageItemRespVO.setSuccessTime( bean.getSuccessTime() );
        payRefundPageItemRespVO.setNotifyTime( bean.getNotifyTime() );
        payRefundPageItemRespVO.setId( bean.getId() );
        payRefundPageItemRespVO.setCreateTime( bean.getCreateTime() );

        return payRefundPageItemRespVO;
    }

    @Override
    public List<PayRefundRespVO> convertList(List<PayRefundDO> list) {
        if ( list == null ) {
            return null;
        }

        List<PayRefundRespVO> list1 = new ArrayList<PayRefundRespVO>( list.size() );
        for ( PayRefundDO payRefundDO : list ) {
            list1.add( convert( payRefundDO ) );
        }

        return list1;
    }

    @Override
    public PageResult<PayRefundRespVO> convertPage(PageResult<PayRefundDO> page) {
        if ( page == null ) {
            return null;
        }

        PageResult<PayRefundRespVO> pageResult = new PageResult<PayRefundRespVO>();

        pageResult.setList( convertList( page.getList() ) );
        pageResult.setTotal( page.getTotal() );

        return pageResult;
    }

    @Override
    public List<PayRefundExcelVO> convertList02(List<PayRefundDO> list) {
        if ( list == null ) {
            return null;
        }

        List<PayRefundExcelVO> list1 = new ArrayList<PayRefundExcelVO>( list.size() );
        for ( PayRefundDO payRefundDO : list ) {
            list1.add( excelConvert( payRefundDO ) );
        }

        return list1;
    }

    @Override
    public PayRefundDO convert(PayOrderDO orderDO) {
        if ( orderDO == null ) {
            return null;
        }

        PayRefundDO payRefundDO = new PayRefundDO();

        payRefundDO.setPayAmount( orderDO.getAmount() );
        payRefundDO.setOrderId( orderDO.getId() );
        payRefundDO.setCreateTime( orderDO.getCreateTime() );
        payRefundDO.setUpdateTime( orderDO.getUpdateTime() );
        payRefundDO.setCreator( orderDO.getCreator() );
        payRefundDO.setUpdater( orderDO.getUpdater() );
        payRefundDO.setDeleted( orderDO.getDeleted() );
        payRefundDO.setId( orderDO.getId() );
        payRefundDO.setMerchantId( orderDO.getMerchantId() );
        payRefundDO.setAppId( orderDO.getAppId() );
        payRefundDO.setChannelId( orderDO.getChannelId() );
        payRefundDO.setChannelCode( orderDO.getChannelCode() );
        payRefundDO.setMerchantOrderId( orderDO.getMerchantOrderId() );
        payRefundDO.setNotifyUrl( orderDO.getNotifyUrl() );
        payRefundDO.setNotifyStatus( orderDO.getNotifyStatus() );
        payRefundDO.setRefundAmount( orderDO.getRefundAmount() );
        payRefundDO.setUserIp( orderDO.getUserIp() );
        payRefundDO.setChannelOrderNo( orderDO.getChannelOrderNo() );
        payRefundDO.setExpireTime( orderDO.getExpireTime() );
        payRefundDO.setSuccessTime( orderDO.getSuccessTime() );
        payRefundDO.setNotifyTime( orderDO.getNotifyTime() );

        return payRefundDO;
    }

    @Override
    public PayRefundReqDTO convert(AppPayRefundReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        PayRefundReqDTO payRefundReqDTO = new PayRefundReqDTO();

        payRefundReqDTO.setPayOrderId( bean.getPayOrderId() );
        payRefundReqDTO.setAmount( bean.getAmount() );
        payRefundReqDTO.setReason( bean.getReason() );
        payRefundReqDTO.setMerchantRefundId( bean.getMerchantRefundId() );

        return payRefundReqDTO;
    }

    @Override
    public AppPayRefundRespVO convert(PayRefundRespDTO bean) {
        if ( bean == null ) {
            return null;
        }

        AppPayRefundRespVO appPayRefundRespVO = new AppPayRefundRespVO();

        appPayRefundRespVO.setRefundId( bean.getRefundId() );

        return appPayRefundRespVO;
    }
}
