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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.wqdaview.vo.WqdaViewCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.wqdaview.vo.WqdaViewExcelVO;
import com.jojubanking.boot.module.system.controller.admin.wqdaview.vo.WqdaViewRespVO;
import com.jojubanking.boot.module.system.controller.admin.wqdaview.vo.WqdaViewUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.wqdaview.WqdaViewDO;
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 WqdaViewConvertImpl implements WqdaViewConvert {

    @Override
    public WqdaViewDO convert(WqdaViewCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        WqdaViewDO wqdaViewDO = new WqdaViewDO();

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

        return wqdaViewDO;
    }

    @Override
    public WqdaViewDO convert(WqdaViewUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        WqdaViewDO wqdaViewDO = new WqdaViewDO();

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

        return wqdaViewDO;
    }

    @Override
    public WqdaViewRespVO convert(WqdaViewDO bean) {
        if ( bean == null ) {
            return null;
        }

        WqdaViewRespVO wqdaViewRespVO = new WqdaViewRespVO();

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

        return wqdaViewRespVO;
    }

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

        List<WqdaViewRespVO> list1 = new ArrayList<WqdaViewRespVO>( list.size() );
        for ( WqdaViewDO wqdaViewDO : list ) {
            list1.add( convert( wqdaViewDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<WqdaViewExcelVO> list1 = new ArrayList<WqdaViewExcelVO>( list.size() );
        for ( WqdaViewDO wqdaViewDO : list ) {
            list1.add( wqdaViewDOToWqdaViewExcelVO( wqdaViewDO ) );
        }

        return list1;
    }

    protected WqdaViewExcelVO wqdaViewDOToWqdaViewExcelVO(WqdaViewDO wqdaViewDO) {
        if ( wqdaViewDO == null ) {
            return null;
        }

        WqdaViewExcelVO wqdaViewExcelVO = new WqdaViewExcelVO();

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

        return wqdaViewExcelVO;
    }
}
