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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.ksinfo.vo.KsInfoCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.ksinfo.vo.KsInfoExcelVO;
import com.jojubanking.boot.module.system.controller.admin.ksinfo.vo.KsInfoRespVO;
import com.jojubanking.boot.module.system.controller.admin.ksinfo.vo.KsInfoUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.ksinfo.KsInfoDO;
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 KsInfoConvertImpl implements KsInfoConvert {

    @Override
    public KsInfoDO convert(KsInfoCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        KsInfoDO ksInfoDO = new KsInfoDO();

        ksInfoDO.setName( bean.getName() );
        ksInfoDO.setTid( bean.getTid() );
        ksInfoDO.setInfo( bean.getInfo() );
        ksInfoDO.setAddress( bean.getAddress() );
        ksInfoDO.setImg( bean.getImg() );
        ksInfoDO.setDepartcode( bean.getDepartcode() );
        ksInfoDO.setDeparttype( bean.getDeparttype() );
        ksInfoDO.setUptype( bean.getUptype() );

        return ksInfoDO;
    }

    @Override
    public KsInfoDO convert(KsInfoUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        KsInfoDO ksInfoDO = new KsInfoDO();

        ksInfoDO.setId( bean.getId() );
        ksInfoDO.setName( bean.getName() );
        ksInfoDO.setTid( bean.getTid() );
        ksInfoDO.setInfo( bean.getInfo() );
        ksInfoDO.setAddress( bean.getAddress() );
        ksInfoDO.setImg( bean.getImg() );
        ksInfoDO.setDepartcode( bean.getDepartcode() );
        ksInfoDO.setDeparttype( bean.getDeparttype() );
        ksInfoDO.setUptype( bean.getUptype() );

        return ksInfoDO;
    }

    @Override
    public KsInfoRespVO convert(KsInfoDO bean) {
        if ( bean == null ) {
            return null;
        }

        KsInfoRespVO ksInfoRespVO = new KsInfoRespVO();

        ksInfoRespVO.setName( bean.getName() );
        ksInfoRespVO.setTid( bean.getTid() );
        ksInfoRespVO.setInfo( bean.getInfo() );
        ksInfoRespVO.setAddress( bean.getAddress() );
        ksInfoRespVO.setImg( bean.getImg() );
        ksInfoRespVO.setDepartcode( bean.getDepartcode() );
        ksInfoRespVO.setDeparttype( bean.getDeparttype() );
        ksInfoRespVO.setUptype( bean.getUptype() );
        ksInfoRespVO.setId( bean.getId() );
        ksInfoRespVO.setCreateTime( bean.getCreateTime() );

        return ksInfoRespVO;
    }

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

        List<KsInfoRespVO> list1 = new ArrayList<KsInfoRespVO>( list.size() );
        for ( KsInfoDO ksInfoDO : list ) {
            list1.add( convert( ksInfoDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<KsInfoExcelVO> list1 = new ArrayList<KsInfoExcelVO>( list.size() );
        for ( KsInfoDO ksInfoDO : list ) {
            list1.add( ksInfoDOToKsInfoExcelVO( ksInfoDO ) );
        }

        return list1;
    }

    protected KsInfoExcelVO ksInfoDOToKsInfoExcelVO(KsInfoDO ksInfoDO) {
        if ( ksInfoDO == null ) {
            return null;
        }

        KsInfoExcelVO ksInfoExcelVO = new KsInfoExcelVO();

        ksInfoExcelVO.setId( ksInfoDO.getId() );
        ksInfoExcelVO.setName( ksInfoDO.getName() );
        ksInfoExcelVO.setTid( ksInfoDO.getTid() );
        ksInfoExcelVO.setInfo( ksInfoDO.getInfo() );
        ksInfoExcelVO.setAddress( ksInfoDO.getAddress() );
        ksInfoExcelVO.setImg( ksInfoDO.getImg() );
        ksInfoExcelVO.setDepartcode( ksInfoDO.getDepartcode() );
        ksInfoExcelVO.setDeparttype( ksInfoDO.getDeparttype() );
        ksInfoExcelVO.setUptype( ksInfoDO.getUptype() );
        ksInfoExcelVO.setCreateTime( ksInfoDO.getCreateTime() );

        return ksInfoExcelVO;
    }
}
