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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.label.vo.LabelCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.label.vo.LabelExcelVO;
import com.jojubanking.boot.module.system.controller.admin.label.vo.LabelRespVO;
import com.jojubanking.boot.module.system.controller.admin.label.vo.LabelUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.label.LabelDO;
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 LabelConvertImpl implements LabelConvert {

    @Override
    public LabelDO convert(LabelCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        LabelDO labelDO = new LabelDO();

        labelDO.setName( bean.getName() );
        labelDO.setInfo( bean.getInfo() );
        labelDO.setFid( bean.getFid() );
        labelDO.setBid( bean.getBid() );

        return labelDO;
    }

    @Override
    public LabelDO convert(LabelUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        LabelDO labelDO = new LabelDO();

        labelDO.setId( bean.getId() );
        labelDO.setName( bean.getName() );
        labelDO.setInfo( bean.getInfo() );
        labelDO.setFid( bean.getFid() );
        labelDO.setBid( bean.getBid() );

        return labelDO;
    }

    @Override
    public LabelRespVO convert(LabelDO bean) {
        if ( bean == null ) {
            return null;
        }

        LabelRespVO labelRespVO = new LabelRespVO();

        labelRespVO.setName( bean.getName() );
        labelRespVO.setInfo( bean.getInfo() );
        labelRespVO.setFid( bean.getFid() );
        labelRespVO.setBid( bean.getBid() );
        labelRespVO.setId( bean.getId() );
        labelRespVO.setCreateTime( bean.getCreateTime() );

        return labelRespVO;
    }

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

        List<LabelRespVO> list1 = new ArrayList<LabelRespVO>( list.size() );
        for ( LabelDO labelDO : list ) {
            list1.add( convert( labelDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<LabelExcelVO> list1 = new ArrayList<LabelExcelVO>( list.size() );
        for ( LabelDO labelDO : list ) {
            list1.add( labelDOToLabelExcelVO( labelDO ) );
        }

        return list1;
    }

    protected LabelExcelVO labelDOToLabelExcelVO(LabelDO labelDO) {
        if ( labelDO == null ) {
            return null;
        }

        LabelExcelVO labelExcelVO = new LabelExcelVO();

        labelExcelVO.setId( labelDO.getId() );
        labelExcelVO.setName( labelDO.getName() );
        labelExcelVO.setInfo( labelDO.getInfo() );
        labelExcelVO.setFid( labelDO.getFid() );
        labelExcelVO.setBid( labelDO.getBid() );
        labelExcelVO.setCreateTime( labelDO.getCreateTime() );

        return labelExcelVO;
    }
}
