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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.wq.vo.WqCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.wq.vo.WqExcelVO;
import com.jojubanking.boot.module.system.controller.admin.wq.vo.WqRespVO;
import com.jojubanking.boot.module.system.controller.admin.wq.vo.WqUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.wq.WqDO;
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 WqConvertImpl implements WqConvert {

    @Override
    public WqDO convert(WqCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        WqDO wqDO = new WqDO();

        wqDO.setTitle( bean.getTitle() );
        wqDO.setTypeId( bean.getTypeId() );
        wqDO.setType( bean.getType() );

        return wqDO;
    }

    @Override
    public WqDO convert(WqUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        WqDO wqDO = new WqDO();

        wqDO.setId( bean.getId() );
        wqDO.setTitle( bean.getTitle() );
        wqDO.setTypeId( bean.getTypeId() );
        wqDO.setType( bean.getType() );

        return wqDO;
    }

    @Override
    public WqRespVO convert(WqDO bean) {
        if ( bean == null ) {
            return null;
        }

        WqRespVO wqRespVO = new WqRespVO();

        wqRespVO.setTitle( bean.getTitle() );
        wqRespVO.setTypeId( bean.getTypeId() );
        wqRespVO.setType( bean.getType() );
        wqRespVO.setId( bean.getId() );
        wqRespVO.setCreateTime( bean.getCreateTime() );

        return wqRespVO;
    }

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

        List<WqRespVO> list1 = new ArrayList<WqRespVO>( list.size() );
        for ( WqDO wqDO : list ) {
            list1.add( convert( wqDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<WqExcelVO> list1 = new ArrayList<WqExcelVO>( list.size() );
        for ( WqDO wqDO : list ) {
            list1.add( wqDOToWqExcelVO( wqDO ) );
        }

        return list1;
    }

    protected WqExcelVO wqDOToWqExcelVO(WqDO wqDO) {
        if ( wqDO == null ) {
            return null;
        }

        WqExcelVO wqExcelVO = new WqExcelVO();

        wqExcelVO.setId( wqDO.getId() );
        wqExcelVO.setTitle( wqDO.getTitle() );
        wqExcelVO.setTypeId( wqDO.getTypeId() );
        wqExcelVO.setType( wqDO.getType() );
        wqExcelVO.setCreateTime( wqDO.getCreateTime() );

        return wqExcelVO;
    }
}
