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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.usecount.vo.UseCountCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.usecount.vo.UseCountExcelVO;
import com.jojubanking.boot.module.system.controller.admin.usecount.vo.UseCountRespVO;
import com.jojubanking.boot.module.system.controller.admin.usecount.vo.UseCountUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.usecount.UseCountDO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2025-12-05T11:32:09+0800",
    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_201 (Oracle Corporation)"
)
public class UseCountConvertImpl implements UseCountConvert {

    @Override
    public UseCountDO convert(UseCountCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        UseCountDO useCountDO = new UseCountDO();

        useCountDO.setInterfaceIdentification( bean.getInterfaceIdentification() );
        useCountDO.setUserId( bean.getUserId() );

        return useCountDO;
    }

    @Override
    public UseCountDO convert(UseCountUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        UseCountDO useCountDO = new UseCountDO();

        useCountDO.setId( bean.getId() );
        useCountDO.setInterfaceIdentification( bean.getInterfaceIdentification() );
        useCountDO.setUserId( bean.getUserId() );

        return useCountDO;
    }

    @Override
    public UseCountRespVO convert(UseCountDO bean) {
        if ( bean == null ) {
            return null;
        }

        UseCountRespVO useCountRespVO = new UseCountRespVO();

        useCountRespVO.setInterfaceIdentification( bean.getInterfaceIdentification() );
        useCountRespVO.setUserId( bean.getUserId() );
        useCountRespVO.setId( bean.getId() );
        useCountRespVO.setCreateTime( bean.getCreateTime() );

        return useCountRespVO;
    }

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

        List<UseCountRespVO> list1 = new ArrayList<UseCountRespVO>( list.size() );
        for ( UseCountDO useCountDO : list ) {
            list1.add( convert( useCountDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<UseCountExcelVO> list1 = new ArrayList<UseCountExcelVO>( list.size() );
        for ( UseCountDO useCountDO : list ) {
            list1.add( useCountDOToUseCountExcelVO( useCountDO ) );
        }

        return list1;
    }

    protected UseCountExcelVO useCountDOToUseCountExcelVO(UseCountDO useCountDO) {
        if ( useCountDO == null ) {
            return null;
        }

        UseCountExcelVO useCountExcelVO = new UseCountExcelVO();

        useCountExcelVO.setId( useCountDO.getId() );
        useCountExcelVO.setInterfaceIdentification( useCountDO.getInterfaceIdentification() );
        useCountExcelVO.setUserId( useCountDO.getUserId() );
        useCountExcelVO.setCreateTime( useCountDO.getCreateTime() );

        return useCountExcelVO;
    }
}
