com.arextest.config.mapper.ServiceMapperImpl Maven / Gradle / Ivy
package com.arextest.config.mapper;
import com.arextest.config.model.dao.config.ServiceCollection;
import com.arextest.config.model.dto.application.ApplicationServiceConfiguration;
import javax.annotation.Generated;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-09-19T06:47:37+0000",
comments = "version: 1.2.0.Final, compiler: javac, environment: Java 11.0.24 (Eclipse Adoptium)"
)
public class ServiceMapperImpl implements ServiceMapper {
@Override
public ApplicationServiceConfiguration dtoFromDao(ServiceCollection dao) {
if ( dao == null ) {
return null;
}
ApplicationServiceConfiguration applicationServiceConfiguration = new ApplicationServiceConfiguration();
applicationServiceConfiguration.setStatus( dao.getStatus() );
applicationServiceConfiguration.setId( dao.getId() );
applicationServiceConfiguration.setAppId( dao.getAppId() );
applicationServiceConfiguration.setServiceName( dao.getServiceName() );
applicationServiceConfiguration.setServiceKey( dao.getServiceKey() );
applicationServiceConfiguration.setModifiedTime( dao.getDataChangeUpdateTime() == null ? null : new java.sql.Timestamp(dao.getDataChangeUpdateTime()) );
return applicationServiceConfiguration;
}
@Override
public ServiceCollection daoFromDto(ApplicationServiceConfiguration dto) {
if ( dto == null ) {
return null;
}
ServiceCollection serviceCollection = new ServiceCollection();
serviceCollection.setAppId( dto.getAppId() );
serviceCollection.setServiceName( dto.getServiceName() );
serviceCollection.setServiceKey( dto.getServiceKey() );
serviceCollection.setStatus( dto.getStatus() );
serviceCollection.setId( null );
serviceCollection.setDataChangeCreateTime( System.currentTimeMillis() );
serviceCollection.setDataChangeUpdateTime( System.currentTimeMillis() );
return serviceCollection;
}
}