From edaa4b84d75b46800ec3c80fccfcecaf72306f04 Mon Sep 17 00:00:00 2001 From: wujiawei <12345678> Date: Tue, 10 Jun 2025 09:26:16 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"[fix]=20=20=E4=BF=AE=E5=A4=8Dnative?= =?UTF-8?q?=E6=89=93=E5=8C=85=E4=B8=8Emapper=E4=B8=8D=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E5=88=87=E6=8D=A2=E8=87=B3=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89bean=E6=8B=B7=E8=B4=9D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6c6584fdb91392f88499472777470d2847d320bc. --- ...LazyNettyServerPropertiesDTOAssembler.java | 215 +++++++----------- ...NettyServerPropertiesDTOAssemblerImpl.java | 144 ++++++++++++ .../LazyNettyServerPropertiesConverter.java | 87 +++---- ...azyNettyServerPropertiesConverterImpl.java | 57 +++++ ...zyNettyServerPropertiesRepositoryImpl.java | 2 +- 5 files changed, 321 insertions(+), 184 deletions(-) create mode 100644 wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/application/assembler/LazyNettyServerPropertiesDTOAssemblerImpl.java create mode 100644 wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/converter/LazyNettyServerPropertiesConverterImpl.java diff --git a/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/application/assembler/LazyNettyServerPropertiesDTOAssembler.java b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/application/assembler/LazyNettyServerPropertiesDTOAssembler.java index 801dc2d8..424c4ea4 100644 --- a/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/application/assembler/LazyNettyServerPropertiesDTOAssembler.java +++ b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/application/assembler/LazyNettyServerPropertiesDTOAssembler.java @@ -1,144 +1,93 @@ package org.framework.lazy.cloud.network.heartbeat.client.application.assembler; -import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.*; -import org.framework.lazy.cloud.network.heartbeat.client.application.dto.LazyNettyServerPropertiesDTO; import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerProperties; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesRemoveCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesStoryCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesUpdateCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesQueryListCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesQueryOneCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.dto.LazyNettyServerPropertiesDTO; import org.mapstruct.factory.Mappers; - -public class LazyNettyServerPropertiesDTOAssembler { +import org.mapstruct.Mapper; +/** + * describe 服务端配置信息 + * + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + * @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyAssembler + **/ +@Mapper +public interface LazyNettyServerPropertiesDTOAssembler { /** * describe MapStruct 创建的代理对象 * + + + * @author Jia wei Wu - * @date 2024/01/24 05:19 下午 + * @date 2024/04/03 03:00 下午 **/ - public static LazyNettyServerPropertiesDTOAssembler INSTANCE = new LazyNettyServerPropertiesDTOAssembler(); - - - public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesStoryCommand lazyNettyServerPropertiesStoryCommand) { - if ( lazyNettyServerPropertiesStoryCommand == null ) { - return null; - } - - LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); - - lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesStoryCommand.getClientId() ); - lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesStoryCommand.getConnectStatus() ); - lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesStoryCommand.getCreateTime() ); - lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesStoryCommand.getInetHost() ); - lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesStoryCommand.getInetPort() ); - lazyNettyServerProperties.setType( lazyNettyServerPropertiesStoryCommand.getType() ); - lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesStoryCommand.getAppKey() ); - lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesStoryCommand.getAppSecret() ); - lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesStoryCommand.getUpdateTime() ); - - return lazyNettyServerProperties; - } - - - public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesUpdateCommand lazyNettyServerPropertiesUpdateCommand) { - if ( lazyNettyServerPropertiesUpdateCommand == null ) { - return null; - } - - LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); - - lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesUpdateCommand.getClientId() ); - lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesUpdateCommand.getConnectStatus() ); - lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesUpdateCommand.getCreateTime() ); - lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesUpdateCommand.getInetHost() ); - lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesUpdateCommand.getInetPort() ); - lazyNettyServerProperties.setType( lazyNettyServerPropertiesUpdateCommand.getType() ); - lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesUpdateCommand.getAppKey() ); - lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesUpdateCommand.getAppSecret() ); - lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesUpdateCommand.getUpdateTime() ); - - return lazyNettyServerProperties; - } - - - public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesQueryOneCommand lazyNettyServerPropertiesQueryOneCommand) { - if ( lazyNettyServerPropertiesQueryOneCommand == null ) { - return null; - } - - LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); - - lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesQueryOneCommand.getClientId() ); - lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesQueryOneCommand.getConnectStatus() ); - lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesQueryOneCommand.getCreateTime() ); - lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesQueryOneCommand.getInetHost() ); - lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesQueryOneCommand.getInetPort() ); - lazyNettyServerProperties.setType( lazyNettyServerPropertiesQueryOneCommand.getType() ); - lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesQueryOneCommand.getAppKey() ); - lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesQueryOneCommand.getAppSecret() ); - lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesQueryOneCommand.getUpdateTime() ); - - return lazyNettyServerProperties; - } - - - public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesQueryListCommand lazyNettyServerPropertiesQueryListCommand) { - if ( lazyNettyServerPropertiesQueryListCommand == null ) { - return null; - } - - LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); - - lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesQueryListCommand.getClientId() ); - lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesQueryListCommand.getConnectStatus() ); - lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesQueryListCommand.getCreateTime() ); - lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesQueryListCommand.getInetHost() ); - lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesQueryListCommand.getInetPort() ); - lazyNettyServerProperties.setType( lazyNettyServerPropertiesQueryListCommand.getType() ); - lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesQueryListCommand.getAppKey() ); - lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesQueryListCommand.getAppSecret() ); - lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesQueryListCommand.getUpdateTime() ); - - return lazyNettyServerProperties; - } - - - public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesRemoveCommand lazyNettyServerPropertiesRemoveCommand) { - if ( lazyNettyServerPropertiesRemoveCommand == null ) { - return null; - } - - LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); - - lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesRemoveCommand.getClientId() ); - lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesRemoveCommand.getConnectStatus() ); - lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesRemoveCommand.getCreateTime() ); - lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesRemoveCommand.getInetHost() ); - lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesRemoveCommand.getInetPort() ); - lazyNettyServerProperties.setType( lazyNettyServerPropertiesRemoveCommand.getType() ); - lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesRemoveCommand.getAppKey() ); - lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesRemoveCommand.getAppSecret() ); - lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesRemoveCommand.getUpdateTime() ); - - return lazyNettyServerProperties; - } - - - public LazyNettyServerPropertiesDTO fromLazyNettyServerProperties(LazyNettyServerProperties lazyNettyServerProperties) { - if ( lazyNettyServerProperties == null ) { - return null; - } - - LazyNettyServerPropertiesDTO lazyNettyServerPropertiesDTO = new LazyNettyServerPropertiesDTO(); - - lazyNettyServerPropertiesDTO.setClientId( lazyNettyServerProperties.getClientId() ); - lazyNettyServerPropertiesDTO.setConnectStatus( lazyNettyServerProperties.getConnectStatus() ); - lazyNettyServerPropertiesDTO.setCreateTime( lazyNettyServerProperties.getCreateTime() ); - lazyNettyServerPropertiesDTO.setInetHost( lazyNettyServerProperties.getInetHost() ); - lazyNettyServerPropertiesDTO.setInetPort( lazyNettyServerProperties.getInetPort() ); - lazyNettyServerPropertiesDTO.setType( lazyNettyServerProperties.getType() ); - lazyNettyServerPropertiesDTO.setAppKey( lazyNettyServerProperties.getAppKey() ); - lazyNettyServerPropertiesDTO.setAppSecret( lazyNettyServerProperties.getAppSecret() ); - lazyNettyServerPropertiesDTO.setUpdateTime( lazyNettyServerProperties.getUpdateTime() ); - - return lazyNettyServerPropertiesDTO; - } -} + LazyNettyServerPropertiesDTOAssembler INSTANCE = Mappers.getMapper(LazyNettyServerPropertiesDTOAssembler.class); + /** + * describe 应用层存储入参转换成 领域对象 + * + * @param lazyNettyServerPropertiesStoryCommand 保存服务端配置信息对象 + * @return {@link LazyNettyServerProperties} 服务端配置信息领域对象 + + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + **/ + LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesStoryCommand lazyNettyServerPropertiesStoryCommand); + /** + * describe 应用层更新入参转换成 领域对象 + * + * @param lazyNettyServerPropertiesUpdateCommand 更新服务端配置信息对象 + * @return {@link LazyNettyServerProperties} 服务端配置信息领域对象 + + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + **/ + LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesUpdateCommand lazyNettyServerPropertiesUpdateCommand); + /** + * describe 应用层查询入参转换成 领域对象 + * + * @param lazyNettyServerPropertiesQueryOneCommand 查询单个服务端配置信息对象参数 + * @return {@link LazyNettyServerProperties} 服务端配置信息领域对象 + + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + **/ + LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesQueryOneCommand lazyNettyServerPropertiesQueryOneCommand); + /** + * describe 应用层查询入参转换成 领域对象 + * + * @param lazyNettyServerPropertiesQueryListCommand 查询集合服务端配置信息对象参数 + * @return {@link LazyNettyServerProperties} 服务端配置信息领域对象 + + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + **/ + LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesQueryListCommand lazyNettyServerPropertiesQueryListCommand); + /** + * describe 应用层删除入参转换成 领域对象 + * + * @param lazyNettyServerPropertiesRemoveCommand 删除服务端配置信息对象参数 + * @return {@link LazyNettyServerProperties} 服务端配置信息领域对象 + + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + **/ + LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesRemoveCommand lazyNettyServerPropertiesRemoveCommand); + /** + * describe 持久层领域对象转换成DTO对象 + * + * @param lazyNettyServerProperties 服务端配置信息领域对象 + * @return {@link LazyNettyServerPropertiesDTO} 服务端配置信息DTO对象 + + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + **/ + LazyNettyServerPropertiesDTO fromLazyNettyServerProperties(LazyNettyServerProperties lazyNettyServerProperties); +} \ No newline at end of file diff --git a/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/application/assembler/LazyNettyServerPropertiesDTOAssemblerImpl.java b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/application/assembler/LazyNettyServerPropertiesDTOAssemblerImpl.java new file mode 100644 index 00000000..c6070b77 --- /dev/null +++ b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/application/assembler/LazyNettyServerPropertiesDTOAssemblerImpl.java @@ -0,0 +1,144 @@ +package org.framework.lazy.cloud.network.heartbeat.client.application.assembler; + +import javax.annotation.processing.Generated; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesQueryListCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesQueryOneCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesRemoveCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesStoryCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.LazyNettyServerPropertiesUpdateCommand; +import org.framework.lazy.cloud.network.heartbeat.client.application.dto.LazyNettyServerPropertiesDTO; +import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerProperties; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2025-06-03T16:10:52+0800", + comments = "version: 1.6.3, compiler: javac, environment: Java 21.0.2 (Oracle Corporation)" +) +public class LazyNettyServerPropertiesDTOAssemblerImpl implements LazyNettyServerPropertiesDTOAssembler { + + @Override + public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesStoryCommand lazyNettyServerPropertiesStoryCommand) { + if ( lazyNettyServerPropertiesStoryCommand == null ) { + return null; + } + + LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); + + lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesStoryCommand.getClientId() ); + lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesStoryCommand.getConnectStatus() ); + lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesStoryCommand.getCreateTime() ); + lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesStoryCommand.getInetHost() ); + lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesStoryCommand.getInetPort() ); + lazyNettyServerProperties.setType( lazyNettyServerPropertiesStoryCommand.getType() ); + lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesStoryCommand.getAppKey() ); + lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesStoryCommand.getAppSecret() ); + lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesStoryCommand.getUpdateTime() ); + + return lazyNettyServerProperties; + } + + @Override + public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesUpdateCommand lazyNettyServerPropertiesUpdateCommand) { + if ( lazyNettyServerPropertiesUpdateCommand == null ) { + return null; + } + + LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); + + lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesUpdateCommand.getClientId() ); + lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesUpdateCommand.getConnectStatus() ); + lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesUpdateCommand.getCreateTime() ); + lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesUpdateCommand.getInetHost() ); + lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesUpdateCommand.getInetPort() ); + lazyNettyServerProperties.setType( lazyNettyServerPropertiesUpdateCommand.getType() ); + lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesUpdateCommand.getAppKey() ); + lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesUpdateCommand.getAppSecret() ); + lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesUpdateCommand.getUpdateTime() ); + + return lazyNettyServerProperties; + } + + @Override + public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesQueryOneCommand lazyNettyServerPropertiesQueryOneCommand) { + if ( lazyNettyServerPropertiesQueryOneCommand == null ) { + return null; + } + + LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); + + lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesQueryOneCommand.getClientId() ); + lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesQueryOneCommand.getConnectStatus() ); + lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesQueryOneCommand.getCreateTime() ); + lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesQueryOneCommand.getInetHost() ); + lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesQueryOneCommand.getInetPort() ); + lazyNettyServerProperties.setType( lazyNettyServerPropertiesQueryOneCommand.getType() ); + lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesQueryOneCommand.getAppKey() ); + lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesQueryOneCommand.getAppSecret() ); + lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesQueryOneCommand.getUpdateTime() ); + + return lazyNettyServerProperties; + } + + @Override + public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesQueryListCommand lazyNettyServerPropertiesQueryListCommand) { + if ( lazyNettyServerPropertiesQueryListCommand == null ) { + return null; + } + + LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); + + lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesQueryListCommand.getClientId() ); + lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesQueryListCommand.getConnectStatus() ); + lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesQueryListCommand.getCreateTime() ); + lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesQueryListCommand.getInetHost() ); + lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesQueryListCommand.getInetPort() ); + lazyNettyServerProperties.setType( lazyNettyServerPropertiesQueryListCommand.getType() ); + lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesQueryListCommand.getAppKey() ); + lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesQueryListCommand.getAppSecret() ); + lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesQueryListCommand.getUpdateTime() ); + + return lazyNettyServerProperties; + } + + @Override + public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesRemoveCommand lazyNettyServerPropertiesRemoveCommand) { + if ( lazyNettyServerPropertiesRemoveCommand == null ) { + return null; + } + + LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); + + lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesRemoveCommand.getClientId() ); + lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesRemoveCommand.getConnectStatus() ); + lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesRemoveCommand.getCreateTime() ); + lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesRemoveCommand.getInetHost() ); + lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesRemoveCommand.getInetPort() ); + lazyNettyServerProperties.setType( lazyNettyServerPropertiesRemoveCommand.getType() ); + lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesRemoveCommand.getAppKey() ); + lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesRemoveCommand.getAppSecret() ); + lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesRemoveCommand.getUpdateTime() ); + + return lazyNettyServerProperties; + } + + @Override + public LazyNettyServerPropertiesDTO fromLazyNettyServerProperties(LazyNettyServerProperties lazyNettyServerProperties) { + if ( lazyNettyServerProperties == null ) { + return null; + } + + LazyNettyServerPropertiesDTO lazyNettyServerPropertiesDTO = new LazyNettyServerPropertiesDTO(); + + lazyNettyServerPropertiesDTO.setClientId( lazyNettyServerProperties.getClientId() ); + lazyNettyServerPropertiesDTO.setConnectStatus( lazyNettyServerProperties.getConnectStatus() ); + lazyNettyServerPropertiesDTO.setCreateTime( lazyNettyServerProperties.getCreateTime() ); + lazyNettyServerPropertiesDTO.setInetHost( lazyNettyServerProperties.getInetHost() ); + lazyNettyServerPropertiesDTO.setInetPort( lazyNettyServerProperties.getInetPort() ); + lazyNettyServerPropertiesDTO.setType( lazyNettyServerProperties.getType() ); + lazyNettyServerPropertiesDTO.setAppKey( lazyNettyServerProperties.getAppKey() ); + lazyNettyServerPropertiesDTO.setAppSecret( lazyNettyServerProperties.getAppSecret() ); + lazyNettyServerPropertiesDTO.setUpdateTime( lazyNettyServerProperties.getUpdateTime() ); + + return lazyNettyServerPropertiesDTO; + } +} diff --git a/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/converter/LazyNettyServerPropertiesConverter.java b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/converter/LazyNettyServerPropertiesConverter.java index 4e0dcf10..d0dbcddc 100644 --- a/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/converter/LazyNettyServerPropertiesConverter.java +++ b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/converter/LazyNettyServerPropertiesConverter.java @@ -2,60 +2,47 @@ package org.framework.lazy.cloud.network.heartbeat.client.infrastructure.convert import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerProperties; import org.framework.lazy.cloud.network.heartbeat.client.infrastructure.entity.LazyNettyServerPropertiesDO; - - -public class LazyNettyServerPropertiesConverter { - +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +/** + * describe 服务端配置信息 + * + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + * @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyInfrastructureConverter + **/ +@Mapper +public interface LazyNettyServerPropertiesConverter { /** * describe MapStruct 创建的代理对象 * + + + * @author Jia wei Wu - * @date 2024/01/24 05:19 下午 + * @date 2024/04/03 03:00 下午 **/ - public static LazyNettyServerPropertiesConverter INSTANCE = new LazyNettyServerPropertiesConverter(); - - public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesDO lazyNettyServerPropertiesDO) { - if (lazyNettyServerPropertiesDO == null) { - return null; - } - - LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); - - lazyNettyServerProperties.setClientId(lazyNettyServerPropertiesDO.getClientId()); - lazyNettyServerProperties.setConnectStatus(lazyNettyServerPropertiesDO.getConnectStatus()); - lazyNettyServerProperties.setCreateTime(lazyNettyServerPropertiesDO.getCreateTime()); - lazyNettyServerProperties.setInetHost(lazyNettyServerPropertiesDO.getInetHost()); - lazyNettyServerProperties.setInetPort(lazyNettyServerPropertiesDO.getInetPort()); - lazyNettyServerProperties.setType(lazyNettyServerPropertiesDO.getType()); - lazyNettyServerProperties.setProtocolType(lazyNettyServerPropertiesDO.getProtocolType()); - lazyNettyServerProperties.setAppKey(lazyNettyServerPropertiesDO.getAppKey()); - lazyNettyServerProperties.setAppSecret(lazyNettyServerPropertiesDO.getAppSecret()); - lazyNettyServerProperties.setUpdateTime(lazyNettyServerPropertiesDO.getUpdateTime()); - - return lazyNettyServerProperties; - } - - - public LazyNettyServerPropertiesDO fromLazyNettyServerProperties(LazyNettyServerProperties lazyNettyServerProperties) { - if (lazyNettyServerProperties == null) { - return null; - } - - LazyNettyServerPropertiesDO lazyNettyServerPropertiesDO = new LazyNettyServerPropertiesDO(); - - lazyNettyServerPropertiesDO.setClientId(lazyNettyServerProperties.getClientId()); - lazyNettyServerPropertiesDO.setConnectStatus(lazyNettyServerProperties.getConnectStatus()); - lazyNettyServerPropertiesDO.setCreateTime(lazyNettyServerProperties.getCreateTime()); - lazyNettyServerPropertiesDO.setInetHost(lazyNettyServerProperties.getInetHost()); - lazyNettyServerPropertiesDO.setInetPort(lazyNettyServerProperties.getInetPort()); - lazyNettyServerPropertiesDO.setAppKey(lazyNettyServerProperties.getAppKey()); - lazyNettyServerPropertiesDO.setAppSecret(lazyNettyServerProperties.getAppSecret()); - lazyNettyServerPropertiesDO.setType(lazyNettyServerProperties.getType()); - lazyNettyServerPropertiesDO.setProtocolType(lazyNettyServerProperties.getProtocolType()); - lazyNettyServerPropertiesDO.setUpdateTime(lazyNettyServerProperties.getUpdateTime()); - - return lazyNettyServerPropertiesDO; - } -} + LazyNettyServerPropertiesConverter INSTANCE = Mappers.getMapper(LazyNettyServerPropertiesConverter.class); + /** + * describe 实体对象 转换成领域对象 + * + * @param lazyNettyServerPropertiesDO 服务端配置信息实体对象 + * @return {@link LazyNettyServerProperties} 服务端配置信息领域对象 + + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + **/ + LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesDO lazyNettyServerPropertiesDO); + /** + * describe 领域对象 转换成实体对象 + * + * @param lazyNettyServerProperties 服务端配置信息领域对象 + * @return {@link LazyNettyServerPropertiesDO} 服务端配置信息实体对象 + + * @author Jia wei Wu + * @date 2024/04/03 03:00 下午 + **/ + LazyNettyServerPropertiesDO fromLazyNettyServerProperties(LazyNettyServerProperties lazyNettyServerProperties); +} \ No newline at end of file diff --git a/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/converter/LazyNettyServerPropertiesConverterImpl.java b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/converter/LazyNettyServerPropertiesConverterImpl.java new file mode 100644 index 00000000..24451d08 --- /dev/null +++ b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/converter/LazyNettyServerPropertiesConverterImpl.java @@ -0,0 +1,57 @@ +package org.framework.lazy.cloud.network.heartbeat.client.infrastructure.converter; + +import javax.annotation.processing.Generated; +import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerProperties; +import org.framework.lazy.cloud.network.heartbeat.client.infrastructure.entity.LazyNettyServerPropertiesDO; + +@Generated( + value = "org.mapstruct.ap.MappingProcessor", + date = "2025-06-03T16:10:52+0800", + comments = "version: 1.6.3, compiler: javac, environment: Java 21.0.2 (Oracle Corporation)" +) +public class LazyNettyServerPropertiesConverterImpl implements LazyNettyServerPropertiesConverter { + + @Override + public LazyNettyServerProperties toLazyNettyServerProperties(LazyNettyServerPropertiesDO lazyNettyServerPropertiesDO) { + if ( lazyNettyServerPropertiesDO == null ) { + return null; + } + + LazyNettyServerProperties lazyNettyServerProperties = new LazyNettyServerProperties(); + + lazyNettyServerProperties.setClientId( lazyNettyServerPropertiesDO.getClientId() ); + lazyNettyServerProperties.setConnectStatus( lazyNettyServerPropertiesDO.getConnectStatus() ); + lazyNettyServerProperties.setCreateTime( lazyNettyServerPropertiesDO.getCreateTime() ); + lazyNettyServerProperties.setInetHost( lazyNettyServerPropertiesDO.getInetHost() ); + lazyNettyServerProperties.setInetPort( lazyNettyServerPropertiesDO.getInetPort() ); + lazyNettyServerProperties.setType( lazyNettyServerPropertiesDO.getType() ); + lazyNettyServerProperties.setProtocolType( lazyNettyServerPropertiesDO.getProtocolType() ); + lazyNettyServerProperties.setAppKey( lazyNettyServerPropertiesDO.getAppKey() ); + lazyNettyServerProperties.setAppSecret( lazyNettyServerPropertiesDO.getAppSecret() ); + lazyNettyServerProperties.setUpdateTime( lazyNettyServerPropertiesDO.getUpdateTime() ); + + return lazyNettyServerProperties; + } + + @Override + public LazyNettyServerPropertiesDO fromLazyNettyServerProperties(LazyNettyServerProperties lazyNettyServerProperties) { + if ( lazyNettyServerProperties == null ) { + return null; + } + + LazyNettyServerPropertiesDO lazyNettyServerPropertiesDO = new LazyNettyServerPropertiesDO(); + + lazyNettyServerPropertiesDO.setClientId( lazyNettyServerProperties.getClientId() ); + lazyNettyServerPropertiesDO.setConnectStatus( lazyNettyServerProperties.getConnectStatus() ); + lazyNettyServerPropertiesDO.setCreateTime( lazyNettyServerProperties.getCreateTime() ); + lazyNettyServerPropertiesDO.setInetHost( lazyNettyServerProperties.getInetHost() ); + lazyNettyServerPropertiesDO.setInetPort( lazyNettyServerProperties.getInetPort() ); + lazyNettyServerPropertiesDO.setAppKey( lazyNettyServerProperties.getAppKey() ); + lazyNettyServerPropertiesDO.setAppSecret( lazyNettyServerProperties.getAppSecret() ); + lazyNettyServerPropertiesDO.setType( lazyNettyServerProperties.getType() ); + lazyNettyServerPropertiesDO.setProtocolType( lazyNettyServerProperties.getProtocolType() ); + lazyNettyServerPropertiesDO.setUpdateTime( lazyNettyServerProperties.getUpdateTime() ); + + return lazyNettyServerPropertiesDO; + } +} diff --git a/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/persistence/LazyNettyServerPropertiesRepositoryImpl.java b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/persistence/LazyNettyServerPropertiesRepositoryImpl.java index a953dd97..52387d1c 100644 --- a/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/persistence/LazyNettyServerPropertiesRepositoryImpl.java +++ b/wu-lazy-cloud-heartbeat-client/src/main/java/org/framework/lazy/cloud/network/heartbeat/client/infrastructure/persistence/LazyNettyServerPropertiesRepositoryImpl.java @@ -2,8 +2,8 @@ package org.framework.lazy.cloud.network.heartbeat.client.infrastructure.persist import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerProperties; import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerPropertiesRepository; -import org.framework.lazy.cloud.network.heartbeat.client.infrastructure.converter.LazyNettyServerPropertiesConverter; import org.framework.lazy.cloud.network.heartbeat.client.infrastructure.entity.LazyNettyServerPropertiesDO; +import org.framework.lazy.cloud.network.heartbeat.client.infrastructure.converter.LazyNettyServerPropertiesConverter; import org.springframework.stereotype.Repository; import java.util.stream.Collectors;