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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.dztype.vo.DzTypeCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.dztype.vo.DzTypeExcelVO;
import com.jojubanking.boot.module.system.controller.admin.dztype.vo.DzTypeRespVO;
import com.jojubanking.boot.module.system.controller.admin.dztype.vo.DzTypeUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.dztype.DzTypeDO;
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 DzTypeConvertImpl implements DzTypeConvert {

    @Override
    public DzTypeDO convert(DzTypeCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        DzTypeDO dzTypeDO = new DzTypeDO();

        dzTypeDO.setBodyAreaType( bean.getBodyAreaType() );
        dzTypeDO.setBodyAreaName( bean.getBodyAreaName() );
        dzTypeDO.setQuestionType( bean.getQuestionType() );
        dzTypeDO.setQuestionTypeName( bean.getQuestionTypeName() );

        return dzTypeDO;
    }

    @Override
    public DzTypeDO convert(DzTypeUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        DzTypeDO dzTypeDO = new DzTypeDO();

        dzTypeDO.setId( bean.getId() );
        dzTypeDO.setBodyAreaType( bean.getBodyAreaType() );
        dzTypeDO.setBodyAreaName( bean.getBodyAreaName() );
        dzTypeDO.setQuestionType( bean.getQuestionType() );
        dzTypeDO.setQuestionTypeName( bean.getQuestionTypeName() );

        return dzTypeDO;
    }

    @Override
    public DzTypeRespVO convert(DzTypeDO bean) {
        if ( bean == null ) {
            return null;
        }

        DzTypeRespVO dzTypeRespVO = new DzTypeRespVO();

        dzTypeRespVO.setBodyAreaType( bean.getBodyAreaType() );
        dzTypeRespVO.setBodyAreaName( bean.getBodyAreaName() );
        dzTypeRespVO.setQuestionType( bean.getQuestionType() );
        dzTypeRespVO.setQuestionTypeName( bean.getQuestionTypeName() );
        dzTypeRespVO.setId( bean.getId() );
        dzTypeRespVO.setCreateTime( bean.getCreateTime() );

        return dzTypeRespVO;
    }

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

        List<DzTypeRespVO> list1 = new ArrayList<DzTypeRespVO>( list.size() );
        for ( DzTypeDO dzTypeDO : list ) {
            list1.add( convert( dzTypeDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<DzTypeExcelVO> list1 = new ArrayList<DzTypeExcelVO>( list.size() );
        for ( DzTypeDO dzTypeDO : list ) {
            list1.add( dzTypeDOToDzTypeExcelVO( dzTypeDO ) );
        }

        return list1;
    }

    protected DzTypeExcelVO dzTypeDOToDzTypeExcelVO(DzTypeDO dzTypeDO) {
        if ( dzTypeDO == null ) {
            return null;
        }

        DzTypeExcelVO dzTypeExcelVO = new DzTypeExcelVO();

        dzTypeExcelVO.setId( dzTypeDO.getId() );
        dzTypeExcelVO.setBodyAreaType( dzTypeDO.getBodyAreaType() );
        dzTypeExcelVO.setBodyAreaName( dzTypeDO.getBodyAreaName() );
        dzTypeExcelVO.setQuestionType( dzTypeDO.getQuestionType() );
        dzTypeExcelVO.setQuestionTypeName( dzTypeDO.getQuestionTypeName() );
        dzTypeExcelVO.setCreateTime( dzTypeDO.getCreateTime() );

        return dzTypeExcelVO;
    }
}
