All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.migoo.framework.infra.convert.developer.sms.SmsLogConvertImpl Maven / Gradle / Ivy

The newest version!
package xyz.migoo.framework.infra.convert.developer.sms;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.processing.Generated;
import xyz.migoo.framework.common.pojo.PageResult;
import xyz.migoo.framework.infra.controller.developer.sms.vo.log.SmsLogRespVO;
import xyz.migoo.framework.infra.dal.dataobject.developer.sms.SmsLogDO;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2024-11-29T19:15:12+0800",
    comments = "version: 1.6.0, compiler: javac, environment: Java 21.0.3 (Oracle Corporation)"
)
public class SmsLogConvertImpl implements SmsLogConvert {

    @Override
    public SmsLogRespVO convert(SmsLogDO bean) {
        if ( bean == null ) {
            return null;
        }

        SmsLogRespVO smsLogRespVO = new SmsLogRespVO();

        smsLogRespVO.setId( bean.getId() );
        smsLogRespVO.setChannelId( bean.getChannelId() );
        smsLogRespVO.setChannelCode( bean.getChannelCode() );
        smsLogRespVO.setTemplateId( bean.getTemplateId() );
        smsLogRespVO.setTemplateCode( bean.getTemplateCode() );
        smsLogRespVO.setTemplateContent( bean.getTemplateContent() );
        Map map = bean.getTemplateParams();
        if ( map != null ) {
            smsLogRespVO.setTemplateParams( new LinkedHashMap( map ) );
        }
        smsLogRespVO.setApiTemplateId( bean.getApiTemplateId() );
        smsLogRespVO.setMobile( bean.getMobile() );
        smsLogRespVO.setUserId( bean.getUserId() );
        smsLogRespVO.setUserType( bean.getUserType() );
        smsLogRespVO.setSendStatus( bean.getSendStatus() );
        smsLogRespVO.setSendTime( bean.getSendTime() );
        smsLogRespVO.setSendCode( bean.getSendCode() );
        smsLogRespVO.setSendMsg( bean.getSendMsg() );
        smsLogRespVO.setApiSendCode( bean.getApiSendCode() );
        smsLogRespVO.setApiSendMsg( bean.getApiSendMsg() );
        smsLogRespVO.setApiRequestId( bean.getApiRequestId() );
        smsLogRespVO.setApiSerialNo( bean.getApiSerialNo() );
        smsLogRespVO.setReceiveStatus( bean.getReceiveStatus() );
        smsLogRespVO.setReceiveTime( bean.getReceiveTime() );
        smsLogRespVO.setApiReceiveCode( bean.getApiReceiveCode() );
        smsLogRespVO.setApiReceiveMsg( bean.getApiReceiveMsg() );
        smsLogRespVO.setCreateTime( bean.getCreateTime() );

        return smsLogRespVO;
    }

    @Override
    public List convertList(List beans) {
        if ( beans == null ) {
            return null;
        }

        List list = new ArrayList( beans.size() );
        for ( SmsLogDO smsLogDO : beans ) {
            list.add( convert( smsLogDO ) );
        }

        return list;
    }

    @Override
    public PageResult convertPage(PageResult page) {
        if ( page == null ) {
            return null;
        }

        PageResult pageResult = new PageResult();

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

        return pageResult;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy