package com.cdm.module.promotion.convert.decorate;

import com.cdm.module.promotion.controller.admin.decorate.vo.DecorateComponentRespVO;
import com.cdm.module.promotion.controller.admin.decorate.vo.DecorateComponentSaveReqVO;
import com.cdm.module.promotion.controller.app.decorate.vo.AppDecorateComponentRespVO;
import com.cdm.module.promotion.dal.dataobject.decorate.DecorateComponentDO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;

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

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

        List<DecorateComponentRespVO> list1 = new ArrayList<DecorateComponentRespVO>( list.size() );
        for ( DecorateComponentDO decorateComponentDO : list ) {
            list1.add( decorateComponentDOToDecorateComponentRespVO( decorateComponentDO ) );
        }

        return list1;
    }

    @Override
    public DecorateComponentDO convert(DecorateComponentSaveReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        DecorateComponentDO decorateComponentDO = new DecorateComponentDO();

        decorateComponentDO.setPage( bean.getPage() );
        decorateComponentDO.setCode( bean.getCode() );
        decorateComponentDO.setValue( bean.getValue() );
        decorateComponentDO.setStatus( bean.getStatus() );

        return decorateComponentDO;
    }

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

        List<AppDecorateComponentRespVO> list1 = new ArrayList<AppDecorateComponentRespVO>( list.size() );
        for ( DecorateComponentDO decorateComponentDO : list ) {
            list1.add( decorateComponentDOToAppDecorateComponentRespVO( decorateComponentDO ) );
        }

        return list1;
    }

    protected DecorateComponentRespVO decorateComponentDOToDecorateComponentRespVO(DecorateComponentDO decorateComponentDO) {
        if ( decorateComponentDO == null ) {
            return null;
        }

        DecorateComponentRespVO decorateComponentRespVO = new DecorateComponentRespVO();

        decorateComponentRespVO.setCode( decorateComponentDO.getCode() );
        decorateComponentRespVO.setValue( decorateComponentDO.getValue() );
        decorateComponentRespVO.setStatus( decorateComponentDO.getStatus() );

        return decorateComponentRespVO;
    }

    protected AppDecorateComponentRespVO decorateComponentDOToAppDecorateComponentRespVO(DecorateComponentDO decorateComponentDO) {
        if ( decorateComponentDO == null ) {
            return null;
        }

        AppDecorateComponentRespVO appDecorateComponentRespVO = new AppDecorateComponentRespVO();

        appDecorateComponentRespVO.setCode( decorateComponentDO.getCode() );
        appDecorateComponentRespVO.setValue( decorateComponentDO.getValue() );

        return appDecorateComponentRespVO;
    }
}
