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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.wqda.vo.WqdaCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.wqda.vo.WqdaExcelVO;
import com.jojubanking.boot.module.system.controller.admin.wqda.vo.WqdaRespVO;
import com.jojubanking.boot.module.system.controller.admin.wqda.vo.WqdaUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.wqda.WqdaDO;
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 WqdaConvertImpl implements WqdaConvert {

    @Override
    public WqdaDO convert(WqdaCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        WqdaDO wqdaDO = new WqdaDO();

        wqdaDO.setTypeId( bean.getTypeId() );
        wqdaDO.setQuestionId( bean.getQuestionId() );
        wqdaDO.setQuestionType( bean.getQuestionType() );
        wqdaDO.setQuestionTitle( bean.getQuestionTitle() );
        wqdaDO.setQuestionAnswer( bean.getQuestionAnswer() );
        wqdaDO.setQuestionComment( bean.getQuestionComment() );
        wqdaDO.setUsername( bean.getUsername() );
        wqdaDO.setUsertel( bean.getUsertel() );

        return wqdaDO;
    }

    @Override
    public WqdaDO convert(WqdaUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        WqdaDO wqdaDO = new WqdaDO();

        wqdaDO.setId( bean.getId() );
        wqdaDO.setTypeId( bean.getTypeId() );
        wqdaDO.setQuestionId( bean.getQuestionId() );
        wqdaDO.setQuestionType( bean.getQuestionType() );
        wqdaDO.setQuestionTitle( bean.getQuestionTitle() );
        wqdaDO.setQuestionAnswer( bean.getQuestionAnswer() );
        wqdaDO.setQuestionComment( bean.getQuestionComment() );
        wqdaDO.setUsername( bean.getUsername() );
        wqdaDO.setUsertel( bean.getUsertel() );

        return wqdaDO;
    }

    @Override
    public WqdaRespVO convert(WqdaDO bean) {
        if ( bean == null ) {
            return null;
        }

        WqdaRespVO wqdaRespVO = new WqdaRespVO();

        wqdaRespVO.setTypeId( bean.getTypeId() );
        wqdaRespVO.setQuestionId( bean.getQuestionId() );
        wqdaRespVO.setQuestionType( bean.getQuestionType() );
        wqdaRespVO.setQuestionTitle( bean.getQuestionTitle() );
        wqdaRespVO.setQuestionAnswer( bean.getQuestionAnswer() );
        wqdaRespVO.setQuestionComment( bean.getQuestionComment() );
        wqdaRespVO.setUsername( bean.getUsername() );
        wqdaRespVO.setUsertel( bean.getUsertel() );
        wqdaRespVO.setId( bean.getId() );
        wqdaRespVO.setCreateTime( bean.getCreateTime() );

        return wqdaRespVO;
    }

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

        List<WqdaRespVO> list1 = new ArrayList<WqdaRespVO>( list.size() );
        for ( WqdaDO wqdaDO : list ) {
            list1.add( convert( wqdaDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<WqdaExcelVO> list1 = new ArrayList<WqdaExcelVO>( list.size() );
        for ( WqdaDO wqdaDO : list ) {
            list1.add( wqdaDOToWqdaExcelVO( wqdaDO ) );
        }

        return list1;
    }

    protected WqdaExcelVO wqdaDOToWqdaExcelVO(WqdaDO wqdaDO) {
        if ( wqdaDO == null ) {
            return null;
        }

        WqdaExcelVO wqdaExcelVO = new WqdaExcelVO();

        wqdaExcelVO.setId( wqdaDO.getId() );
        wqdaExcelVO.setTypeId( wqdaDO.getTypeId() );
        wqdaExcelVO.setQuestionId( wqdaDO.getQuestionId() );
        wqdaExcelVO.setQuestionType( wqdaDO.getQuestionType() );
        wqdaExcelVO.setQuestionTitle( wqdaDO.getQuestionTitle() );
        wqdaExcelVO.setQuestionAnswer( wqdaDO.getQuestionAnswer() );
        wqdaExcelVO.setQuestionComment( wqdaDO.getQuestionComment() );
        wqdaExcelVO.setUsername( wqdaDO.getUsername() );
        wqdaExcelVO.setUsertel( wqdaDO.getUsertel() );
        wqdaExcelVO.setCreateTime( wqdaDO.getCreateTime() );

        return wqdaExcelVO;
    }
}
