package com.artfess.manage.dwd.manager.mapper;

import com.artfess.manage.dwd.manager.dto.DwdLkEpidemicCityDto;
import com.artfess.manage.dwd.model.DwdLkEpidemicCity;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2023-05-08T09:35:57+0800",
    comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_71 (Oracle Corporation)"
)
@Component
public class DwdLkEpidemicCityDtoMapperImpl implements DwdLkEpidemicCityDtoMapper {

    @Override
    public DwdLkEpidemicCity toEntity(DwdLkEpidemicCityDto dto) {
        if ( dto == null ) {
            return null;
        }

        DwdLkEpidemicCity dwdLkEpidemicCity = new DwdLkEpidemicCity();

        dwdLkEpidemicCity.setId( dto.getId() );
        dwdLkEpidemicCity.setCity( dto.getCity() );
        dwdLkEpidemicCity.setLevel( dto.getLevel() );
        dwdLkEpidemicCity.setUpdateTime( dto.getUpdateTime() );

        return dwdLkEpidemicCity;
    }

    @Override
    public DwdLkEpidemicCityDto toDto(DwdLkEpidemicCity entity) {
        if ( entity == null ) {
            return null;
        }

        DwdLkEpidemicCityDto dwdLkEpidemicCityDto = new DwdLkEpidemicCityDto();

        dwdLkEpidemicCityDto.setId( entity.getId() );
        dwdLkEpidemicCityDto.setCity( entity.getCity() );
        dwdLkEpidemicCityDto.setLevel( entity.getLevel() );
        dwdLkEpidemicCityDto.setUpdateTime( entity.getUpdateTime() );

        return dwdLkEpidemicCityDto;
    }

    @Override
    public List<DwdLkEpidemicCity> toEntity(List<DwdLkEpidemicCityDto> dtoList) {
        if ( dtoList == null ) {
            return null;
        }

        List<DwdLkEpidemicCity> list = new ArrayList<DwdLkEpidemicCity>( dtoList.size() );
        for ( DwdLkEpidemicCityDto dwdLkEpidemicCityDto : dtoList ) {
            list.add( toEntity( dwdLkEpidemicCityDto ) );
        }

        return list;
    }

    @Override
    public List<DwdLkEpidemicCityDto> toDto(List<DwdLkEpidemicCity> entityList) {
        if ( entityList == null ) {
            return null;
        }

        List<DwdLkEpidemicCityDto> list = new ArrayList<DwdLkEpidemicCityDto>( entityList.size() );
        for ( DwdLkEpidemicCity dwdLkEpidemicCity : entityList ) {
            list.add( toDto( dwdLkEpidemicCity ) );
        }

        return list;
    }
}
