xyz.migoo.framework.infra.convert.developer.sms.SmsChannelConvertImpl Maven / Gradle / Ivy
The newest version!
package xyz.migoo.framework.infra.convert.developer.sms;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;
import xyz.migoo.framework.common.pojo.PageResult;
import xyz.migoo.framework.common.pojo.SimpleData;
import xyz.migoo.framework.infra.controller.developer.sms.vo.channel.SmsChannelCreateReqVO;
import xyz.migoo.framework.infra.controller.developer.sms.vo.channel.SmsChannelRespVO;
import xyz.migoo.framework.infra.controller.developer.sms.vo.channel.SmsChannelSimpleRespVO;
import xyz.migoo.framework.infra.controller.developer.sms.vo.channel.SmsChannelUpdateReqVO;
import xyz.migoo.framework.infra.dal.dataobject.developer.sms.SmsChannelDO;
import xyz.migoo.framework.infra.dal.dataobject.developer.sms.SmsTemplateDO;
import xyz.migoo.framework.sms.core.property.SmsChannelProperties;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-11-29T19:15:13+0800",
comments = "version: 1.6.0, compiler: javac, environment: Java 21.0.3 (Oracle Corporation)"
)
public class SmsChannelConvertImpl implements SmsChannelConvert {
@Override
public SmsChannelDO convert(SmsChannelCreateReqVO bean) {
if ( bean == null ) {
return null;
}
SmsChannelDO smsChannelDO = new SmsChannelDO();
smsChannelDO.setSignature( bean.getSignature() );
smsChannelDO.setCode( bean.getCode() );
smsChannelDO.setStatus( bean.getStatus() );
smsChannelDO.setApiKey( bean.getApiKey() );
smsChannelDO.setApiSecret( bean.getApiSecret() );
smsChannelDO.setCallbackUrl( bean.getCallbackUrl() );
return smsChannelDO;
}
@Override
public SmsChannelDO convert(SmsChannelUpdateReqVO bean) {
if ( bean == null ) {
return null;
}
SmsChannelDO smsChannelDO = new SmsChannelDO();
smsChannelDO.setId( bean.getId() );
smsChannelDO.setSignature( bean.getSignature() );
smsChannelDO.setStatus( bean.getStatus() );
smsChannelDO.setApiKey( bean.getApiKey() );
smsChannelDO.setApiSecret( bean.getApiSecret() );
smsChannelDO.setCallbackUrl( bean.getCallbackUrl() );
return smsChannelDO;
}
@Override
public SmsChannelRespVO convert(SmsChannelDO bean) {
if ( bean == null ) {
return null;
}
SmsChannelRespVO smsChannelRespVO = new SmsChannelRespVO();
smsChannelRespVO.setSignature( bean.getSignature() );
smsChannelRespVO.setStatus( bean.getStatus() );
smsChannelRespVO.setApiKey( bean.getApiKey() );
smsChannelRespVO.setApiSecret( bean.getApiSecret() );
smsChannelRespVO.setCallbackUrl( bean.getCallbackUrl() );
smsChannelRespVO.setId( bean.getId() );
smsChannelRespVO.setCode( bean.getCode() );
smsChannelRespVO.setCreateTime( bean.getCreateTime() );
return smsChannelRespVO;
}
@Override
public List convertList(List list) {
if ( list == null ) {
return null;
}
List list1 = new ArrayList( list.size() );
for ( SmsChannelDO smsChannelDO : list ) {
list1.add( convert( smsChannelDO ) );
}
return list1;
}
@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;
}
@Override
public SmsChannelProperties convert01(SmsChannelDO bean) {
if ( bean == null ) {
return null;
}
SmsChannelProperties smsChannelProperties = new SmsChannelProperties();
smsChannelProperties.setId( bean.getId() );
smsChannelProperties.setSignature( bean.getSignature() );
smsChannelProperties.setCode( bean.getCode() );
smsChannelProperties.setApiKey( bean.getApiKey() );
smsChannelProperties.setApiSecret( bean.getApiSecret() );
smsChannelProperties.setCallbackUrl( bean.getCallbackUrl() );
return smsChannelProperties;
}
@Override
public List convertList02(List list) {
if ( list == null ) {
return null;
}
List list1 = new ArrayList( list.size() );
for ( SmsChannelDO smsChannelDO : list ) {
list1.add( convert01( smsChannelDO ) );
}
return list1;
}
@Override
public List convertList03(List list) {
if ( list == null ) {
return null;
}
List list1 = new ArrayList( list.size() );
for ( SmsChannelDO smsChannelDO : list ) {
list1.add( smsChannelDOToSmsChannelSimpleRespVO( smsChannelDO ) );
}
return list1;
}
@Override
public List convertList04(List list) {
if ( list == null ) {
return null;
}
List list1 = new ArrayList( list.size() );
for ( SmsTemplateDO smsTemplateDO : list ) {
list1.add( convert( smsTemplateDO ) );
}
return list1;
}
protected SmsChannelSimpleRespVO smsChannelDOToSmsChannelSimpleRespVO(SmsChannelDO smsChannelDO) {
if ( smsChannelDO == null ) {
return null;
}
SmsChannelSimpleRespVO smsChannelSimpleRespVO = new SmsChannelSimpleRespVO();
smsChannelSimpleRespVO.setId( smsChannelDO.getId() );
smsChannelSimpleRespVO.setSignature( smsChannelDO.getSignature() );
smsChannelSimpleRespVO.setCode( smsChannelDO.getCode() );
return smsChannelSimpleRespVO;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy