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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.xytjjg.vo.XytjjgCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.xytjjg.vo.XytjjgExcelVO;
import com.jojubanking.boot.module.system.controller.admin.xytjjg.vo.XytjjgHisItems;
import com.jojubanking.boot.module.system.controller.admin.xytjjg.vo.XytjjgRespVO;
import com.jojubanking.boot.module.system.controller.admin.xytjjg.vo.XytjjgUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.xytjjg.XytjjgDO;
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 XytjjgConvertImpl implements XytjjgConvert {

    @Override
    public XytjjgDO convert(XytjjgCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        XytjjgDO xytjjgDO = new XytjjgDO();

        xytjjgDO.setItemno( bean.getItemno() );
        xytjjgDO.setItemname( bean.getItemname() );
        xytjjgDO.setItemprice( bean.getItemprice() );
        xytjjgDO.setItemflag( bean.getItemflag() );

        return xytjjgDO;
    }

    @Override
    public XytjjgDO convert(XytjjgUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        XytjjgDO xytjjgDO = new XytjjgDO();

        xytjjgDO.setId( bean.getId() );
        xytjjgDO.setItemno( bean.getItemno() );
        xytjjgDO.setItemname( bean.getItemname() );
        xytjjgDO.setItemprice( bean.getItemprice() );
        xytjjgDO.setItemflag( bean.getItemflag() );

        return xytjjgDO;
    }

    @Override
    public XytjjgRespVO convert(XytjjgDO bean) {
        if ( bean == null ) {
            return null;
        }

        XytjjgRespVO xytjjgRespVO = new XytjjgRespVO();

        xytjjgRespVO.setItemno( bean.getItemno() );
        xytjjgRespVO.setItemname( bean.getItemname() );
        xytjjgRespVO.setItemprice( bean.getItemprice() );
        xytjjgRespVO.setItemflag( bean.getItemflag() );
        xytjjgRespVO.setId( bean.getId() );
        xytjjgRespVO.setCreateTime( bean.getCreateTime() );

        return xytjjgRespVO;
    }

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

        List<XytjjgRespVO> list1 = new ArrayList<XytjjgRespVO>( list.size() );
        for ( XytjjgDO xytjjgDO : list ) {
            list1.add( convert( xytjjgDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<XytjjgExcelVO> list1 = new ArrayList<XytjjgExcelVO>( list.size() );
        for ( XytjjgDO xytjjgDO : list ) {
            list1.add( xytjjgDOToXytjjgExcelVO( xytjjgDO ) );
        }

        return list1;
    }

    @Override
    public List<XytjjgHisItems> convertList03(List<XytjjgDO> list) {
        if ( list == null ) {
            return null;
        }

        List<XytjjgHisItems> list1 = new ArrayList<XytjjgHisItems>( list.size() );
        for ( XytjjgDO xytjjgDO : list ) {
            list1.add( xytjjgDOToXytjjgHisItems( xytjjgDO ) );
        }

        return list1;
    }

    protected XytjjgExcelVO xytjjgDOToXytjjgExcelVO(XytjjgDO xytjjgDO) {
        if ( xytjjgDO == null ) {
            return null;
        }

        XytjjgExcelVO xytjjgExcelVO = new XytjjgExcelVO();

        xytjjgExcelVO.setId( xytjjgDO.getId() );
        xytjjgExcelVO.setItemno( xytjjgDO.getItemno() );
        xytjjgExcelVO.setItemname( xytjjgDO.getItemname() );
        xytjjgExcelVO.setItemprice( xytjjgDO.getItemprice() );
        xytjjgExcelVO.setItemflag( xytjjgDO.getItemflag() );
        xytjjgExcelVO.setCreateTime( xytjjgDO.getCreateTime() );

        return xytjjgExcelVO;
    }

    protected XytjjgHisItems xytjjgDOToXytjjgHisItems(XytjjgDO xytjjgDO) {
        if ( xytjjgDO == null ) {
            return null;
        }

        XytjjgHisItems xytjjgHisItems = new XytjjgHisItems();

        xytjjgHisItems.setItemno( xytjjgDO.getItemno() );
        xytjjgHisItems.setItemname( xytjjgDO.getItemname() );
        xytjjgHisItems.setItemprice( xytjjgDO.getItemprice() );
        xytjjgHisItems.setItemflag( xytjjgDO.getItemflag() );
        xytjjgHisItems.setCreateTime( xytjjgDO.getCreateTime() );

        return xytjjgHisItems;
    }
}
