package com.cdm.module.trade.convert.delivery;

import com.cdm.framework.common.pojo.PageResult;
import com.cdm.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreCreateReqVO;
import com.cdm.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreRespVO;
import com.cdm.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreSimpleRespVO;
import com.cdm.module.trade.controller.admin.delivery.vo.pickup.DeliveryPickUpStoreUpdateReqVO;
import com.cdm.module.trade.controller.app.delivery.vo.pickup.AppDeliveryPickUpStoreRespVO;
import com.cdm.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreDO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2023-12-21T17:56:57+0800",
    comments = "version: 1.5.5.Final, compiler: javac, environment: Java 17.0.3 (JetBrains s.r.o.)"
)
public class DeliveryPickUpStoreConvertImpl implements DeliveryPickUpStoreConvert {

    @Override
    public DeliveryPickUpStoreDO convert(DeliveryPickUpStoreCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        DeliveryPickUpStoreDO deliveryPickUpStoreDO = new DeliveryPickUpStoreDO();

        deliveryPickUpStoreDO.setName( bean.getName() );
        deliveryPickUpStoreDO.setIntroduction( bean.getIntroduction() );
        deliveryPickUpStoreDO.setPhone( bean.getPhone() );
        deliveryPickUpStoreDO.setAreaId( bean.getAreaId() );
        deliveryPickUpStoreDO.setDetailAddress( bean.getDetailAddress() );
        deliveryPickUpStoreDO.setLogo( bean.getLogo() );
        deliveryPickUpStoreDO.setOpeningTime( bean.getOpeningTime() );
        deliveryPickUpStoreDO.setClosingTime( bean.getClosingTime() );
        deliveryPickUpStoreDO.setLatitude( bean.getLatitude() );
        deliveryPickUpStoreDO.setLongitude( bean.getLongitude() );
        deliveryPickUpStoreDO.setStatus( bean.getStatus() );

        return deliveryPickUpStoreDO;
    }

    @Override
    public DeliveryPickUpStoreDO convert(DeliveryPickUpStoreUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        DeliveryPickUpStoreDO deliveryPickUpStoreDO = new DeliveryPickUpStoreDO();

        deliveryPickUpStoreDO.setId( bean.getId() );
        deliveryPickUpStoreDO.setName( bean.getName() );
        deliveryPickUpStoreDO.setIntroduction( bean.getIntroduction() );
        deliveryPickUpStoreDO.setPhone( bean.getPhone() );
        deliveryPickUpStoreDO.setAreaId( bean.getAreaId() );
        deliveryPickUpStoreDO.setDetailAddress( bean.getDetailAddress() );
        deliveryPickUpStoreDO.setLogo( bean.getLogo() );
        deliveryPickUpStoreDO.setOpeningTime( bean.getOpeningTime() );
        deliveryPickUpStoreDO.setClosingTime( bean.getClosingTime() );
        deliveryPickUpStoreDO.setLatitude( bean.getLatitude() );
        deliveryPickUpStoreDO.setLongitude( bean.getLongitude() );
        deliveryPickUpStoreDO.setStatus( bean.getStatus() );

        return deliveryPickUpStoreDO;
    }

    @Override
    public DeliveryPickUpStoreRespVO convert(DeliveryPickUpStoreDO bean) {
        if ( bean == null ) {
            return null;
        }

        DeliveryPickUpStoreRespVO deliveryPickUpStoreRespVO = new DeliveryPickUpStoreRespVO();

        deliveryPickUpStoreRespVO.setName( bean.getName() );
        deliveryPickUpStoreRespVO.setIntroduction( bean.getIntroduction() );
        deliveryPickUpStoreRespVO.setPhone( bean.getPhone() );
        deliveryPickUpStoreRespVO.setAreaId( bean.getAreaId() );
        deliveryPickUpStoreRespVO.setDetailAddress( bean.getDetailAddress() );
        deliveryPickUpStoreRespVO.setLogo( bean.getLogo() );
        deliveryPickUpStoreRespVO.setOpeningTime( bean.getOpeningTime() );
        deliveryPickUpStoreRespVO.setClosingTime( bean.getClosingTime() );
        deliveryPickUpStoreRespVO.setLatitude( bean.getLatitude() );
        deliveryPickUpStoreRespVO.setLongitude( bean.getLongitude() );
        deliveryPickUpStoreRespVO.setStatus( bean.getStatus() );
        deliveryPickUpStoreRespVO.setId( bean.getId() );
        deliveryPickUpStoreRespVO.setCreateTime( bean.getCreateTime() );

        return deliveryPickUpStoreRespVO;
    }

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

        List<DeliveryPickUpStoreRespVO> list1 = new ArrayList<DeliveryPickUpStoreRespVO>( list.size() );
        for ( DeliveryPickUpStoreDO deliveryPickUpStoreDO : list ) {
            list1.add( convert( deliveryPickUpStoreDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

    @Override
    public List<DeliveryPickUpStoreSimpleRespVO> convertList1(List<DeliveryPickUpStoreDO> list) {
        if ( list == null ) {
            return null;
        }

        List<DeliveryPickUpStoreSimpleRespVO> list1 = new ArrayList<DeliveryPickUpStoreSimpleRespVO>( list.size() );
        for ( DeliveryPickUpStoreDO deliveryPickUpStoreDO : list ) {
            list1.add( convert02( deliveryPickUpStoreDO ) );
        }

        return list1;
    }

    @Override
    public DeliveryPickUpStoreSimpleRespVO convert02(DeliveryPickUpStoreDO bean) {
        if ( bean == null ) {
            return null;
        }

        DeliveryPickUpStoreSimpleRespVO deliveryPickUpStoreSimpleRespVO = new DeliveryPickUpStoreSimpleRespVO();

        deliveryPickUpStoreSimpleRespVO.setAreaName( convertAreaIdToAreaName( bean.getAreaId() ) );
        deliveryPickUpStoreSimpleRespVO.setId( bean.getId() );
        deliveryPickUpStoreSimpleRespVO.setName( bean.getName() );
        deliveryPickUpStoreSimpleRespVO.setPhone( bean.getPhone() );
        deliveryPickUpStoreSimpleRespVO.setAreaId( bean.getAreaId() );
        deliveryPickUpStoreSimpleRespVO.setDetailAddress( bean.getDetailAddress() );

        return deliveryPickUpStoreSimpleRespVO;
    }

    @Override
    public AppDeliveryPickUpStoreRespVO convert03(DeliveryPickUpStoreDO bean) {
        if ( bean == null ) {
            return null;
        }

        AppDeliveryPickUpStoreRespVO appDeliveryPickUpStoreRespVO = new AppDeliveryPickUpStoreRespVO();

        appDeliveryPickUpStoreRespVO.setAreaName( convertAreaIdToAreaName( bean.getAreaId() ) );
        appDeliveryPickUpStoreRespVO.setId( bean.getId() );
        appDeliveryPickUpStoreRespVO.setName( bean.getName() );
        appDeliveryPickUpStoreRespVO.setLogo( bean.getLogo() );
        appDeliveryPickUpStoreRespVO.setPhone( bean.getPhone() );
        appDeliveryPickUpStoreRespVO.setAreaId( bean.getAreaId() );
        appDeliveryPickUpStoreRespVO.setDetailAddress( bean.getDetailAddress() );
        appDeliveryPickUpStoreRespVO.setLatitude( bean.getLatitude() );
        appDeliveryPickUpStoreRespVO.setLongitude( bean.getLongitude() );

        return appDeliveryPickUpStoreRespVO;
    }
}
