package com.jojubanking.boot.module.system.convert.wqwt;

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.wqwt.vo.WqwtCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.wqwt.vo.WqwtExcelVO;
import com.jojubanking.boot.module.system.controller.admin.wqwt.vo.WqwtRespVO;
import com.jojubanking.boot.module.system.controller.admin.wqwt.vo.WqwtUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.wqwt.WqwtDO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

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

    @Override
    public WqwtDO convert(WqwtCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        WqwtDO wqwtDO = new WqwtDO();

        wqwtDO.setTypeId( bean.getTypeId() );
        wqwtDO.setQuestionId( bean.getQuestionId() );
        wqwtDO.setPid( bean.getPid() );
        wqwtDO.setGradingType( bean.getGradingType() );
        wqwtDO.setQuestionType( bean.getQuestionType() );
        wqwtDO.setQuestionTitle( bean.getQuestionTitle() );
        wqwtDO.setQuestionOpnum( bean.getQuestionOpnum() );
        wqwtDO.setQuestionContent( bean.getQuestionContent() );

        return wqwtDO;
    }

    @Override
    public WqwtDO convert(WqwtUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        WqwtDO wqwtDO = new WqwtDO();

        wqwtDO.setId( bean.getId() );
        wqwtDO.setTypeId( bean.getTypeId() );
        wqwtDO.setQuestionId( bean.getQuestionId() );
        wqwtDO.setPid( bean.getPid() );
        wqwtDO.setGradingType( bean.getGradingType() );
        wqwtDO.setQuestionType( bean.getQuestionType() );
        wqwtDO.setQuestionTitle( bean.getQuestionTitle() );
        wqwtDO.setQuestionOpnum( bean.getQuestionOpnum() );
        wqwtDO.setQuestionContent( bean.getQuestionContent() );

        return wqwtDO;
    }

    @Override
    public WqwtRespVO convert(WqwtDO bean) {
        if ( bean == null ) {
            return null;
        }

        WqwtRespVO wqwtRespVO = new WqwtRespVO();

        wqwtRespVO.setTypeId( bean.getTypeId() );
        wqwtRespVO.setQuestionId( bean.getQuestionId() );
        wqwtRespVO.setPid( bean.getPid() );
        wqwtRespVO.setGradingType( bean.getGradingType() );
        wqwtRespVO.setQuestionType( bean.getQuestionType() );
        wqwtRespVO.setQuestionTitle( bean.getQuestionTitle() );
        wqwtRespVO.setQuestionOpnum( bean.getQuestionOpnum() );
        wqwtRespVO.setQuestionContent( bean.getQuestionContent() );
        wqwtRespVO.setId( bean.getId() );
        wqwtRespVO.setCreateTime( bean.getCreateTime() );

        return wqwtRespVO;
    }

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

        List<WqwtRespVO> list1 = new ArrayList<WqwtRespVO>( list.size() );
        for ( WqwtDO wqwtDO : list ) {
            list1.add( convert( wqwtDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<WqwtExcelVO> list1 = new ArrayList<WqwtExcelVO>( list.size() );
        for ( WqwtDO wqwtDO : list ) {
            list1.add( wqwtDOToWqwtExcelVO( wqwtDO ) );
        }

        return list1;
    }

    protected WqwtExcelVO wqwtDOToWqwtExcelVO(WqwtDO wqwtDO) {
        if ( wqwtDO == null ) {
            return null;
        }

        WqwtExcelVO wqwtExcelVO = new WqwtExcelVO();

        wqwtExcelVO.setId( wqwtDO.getId() );
        wqwtExcelVO.setTypeId( wqwtDO.getTypeId() );
        wqwtExcelVO.setQuestionId( wqwtDO.getQuestionId() );
        wqwtExcelVO.setPid( wqwtDO.getPid() );
        wqwtExcelVO.setGradingType( wqwtDO.getGradingType() );
        wqwtExcelVO.setQuestionType( wqwtDO.getQuestionType() );
        wqwtExcelVO.setQuestionTitle( wqwtDO.getQuestionTitle() );
        wqwtExcelVO.setQuestionOpnum( wqwtDO.getQuestionOpnum() );
        wqwtExcelVO.setQuestionContent( wqwtDO.getQuestionContent() );
        wqwtExcelVO.setCreateTime( wqwtDO.getCreateTime() );

        return wqwtExcelVO;
    }
}
