mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-06 13:27:55 +08:00
【fix】服务端内网渗透
This commit is contained in:
parent
5852aad88a
commit
234613a76a
@ -0,0 +1,46 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.common;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渗透端口对应访客上下文
|
||||||
|
*/
|
||||||
|
public class NettyPermeateVisitorContext {
|
||||||
|
|
||||||
|
protected static final ConcurrentHashMap<Integer/*permeatePort*/, Object/*NettyPermeateVisitorSocket*/> PERMEATE_VISITOR_SOCKET = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加访客
|
||||||
|
*
|
||||||
|
* @param permeatePort 渗透端口
|
||||||
|
* @param permeateVisitorSocket 渗透访客socket
|
||||||
|
*/
|
||||||
|
public static <T> void pushPermeateVisitorSocket(Integer permeatePort, T permeateVisitorSocket) {
|
||||||
|
PERMEATE_VISITOR_SOCKET.put(permeatePort, permeateVisitorSocket);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过客户端ID获取客户端使用的访客socket
|
||||||
|
*
|
||||||
|
* @param <T> 渗透访客socket
|
||||||
|
* @param permeatePort 渗透端口
|
||||||
|
* @return 访客
|
||||||
|
*/
|
||||||
|
public static <T> T getPermeateVisitorSocket(Integer permeatePort) {
|
||||||
|
return (T) PERMEATE_VISITOR_SOCKET.getOrDefault(permeatePort, null);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 移除 渗透访客socket
|
||||||
|
*
|
||||||
|
* @param permeatePort 渗透端口
|
||||||
|
*/
|
||||||
|
public static void removePermeateVisitorSockets(Integer permeatePort) {
|
||||||
|
PERMEATE_VISITOR_SOCKET.remove(permeatePort);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.init;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.LazyInternalNetworkServerPermeateMappingApplication;
|
||||||
|
import org.springframework.boot.CommandLineRunner;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化服务端内网渗透socket
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Configuration
|
||||||
|
public class InitServerPermeateSocket implements CommandLineRunner {
|
||||||
|
private final LazyInternalNetworkServerPermeateMappingApplication lazyInternalNetworkServerPermeateMappingApplication;
|
||||||
|
|
||||||
|
public InitServerPermeateSocket(LazyInternalNetworkServerPermeateMappingApplication lazyInternalNetworkServerPermeateMappingApplication) {
|
||||||
|
this.lazyInternalNetworkServerPermeateMappingApplication = lazyInternalNetworkServerPermeateMappingApplication;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(String... args) throws Exception {
|
||||||
|
lazyInternalNetworkServerPermeateMappingApplication.initPermeateSocket();
|
||||||
|
}
|
||||||
|
}
|
@ -7,7 +7,6 @@ import io.netty.channel.nio.NioEventLoopGroup;
|
|||||||
import io.netty.channel.socket.nio.NioSocketChannel;
|
import io.netty.channel.socket.nio.NioSocketChannel;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.InternalNetworkPermeateRealServer;
|
import org.framework.lazy.cloud.network.heartbeat.common.InternalNetworkPermeateRealServer;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyVisitorPortContext;
|
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.filter.PermeateClientRealFilter;
|
import org.framework.lazy.cloud.network.heartbeat.server.netty.filter.PermeateClientRealFilter;
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import io.netty.channel.socket.nio.NioServerSocketChannel;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.InternalNetworkPermeateRealServer;
|
import org.framework.lazy.cloud.network.heartbeat.common.InternalNetworkPermeateRealServer;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.common.NettyPermeateVisitorContext;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyVisitorPortContext;
|
import org.framework.lazy.cloud.network.heartbeat.common.NettyVisitorPortContext;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelFlowAdapter;
|
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelFlowAdapter;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.filter.PermeateVisitorFilter;
|
import org.framework.lazy.cloud.network.heartbeat.server.netty.filter.PermeateVisitorFilter;
|
||||||
@ -44,8 +45,8 @@ public class NettyPermeateVisitorSocket {
|
|||||||
*/
|
*/
|
||||||
public void start() throws Exception {
|
public void start() throws Exception {
|
||||||
|
|
||||||
Channel visitor = NettyVisitorPortContext.getVisitor(visitorPort);
|
NettyPermeateVisitorSocket nettyPermeateVisitorSocket = NettyPermeateVisitorContext.getPermeateVisitorSocket(visitorPort);
|
||||||
if (visitor == null) {
|
if (nettyPermeateVisitorSocket == null) {
|
||||||
ServerBootstrap bootstrap = new ServerBootstrap();
|
ServerBootstrap bootstrap = new ServerBootstrap();
|
||||||
bootstrap
|
bootstrap
|
||||||
.group(bossGroup, workerGroup)
|
.group(bossGroup, workerGroup)
|
||||||
@ -71,12 +72,12 @@ public class NettyPermeateVisitorSocket {
|
|||||||
if (future.isSuccess()) {
|
if (future.isSuccess()) {
|
||||||
// 这里时异步处理
|
// 这里时异步处理
|
||||||
log.info("内网渗透服务端端口:[{}] 开启", visitorPort);
|
log.info("内网渗透服务端端口:[{}] 开启", visitorPort);
|
||||||
NettyVisitorPortContext.pushVisitor(visitorPort, future.channel());
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log.error("内网渗透服务端端口:[{}] 开启失败", visitorPort);
|
log.error("内网渗透服务端端口:[{}] 开启失败", visitorPort);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
NettyPermeateVisitorContext.pushPermeateVisitorSocket(visitorPort,this);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log.warn("内网渗透服务端端口:[{}] 重复启动", visitorPort);
|
log.warn("内网渗透服务端端口:[{}] 重复启动", visitorPort);
|
||||||
@ -93,12 +94,9 @@ public class NettyPermeateVisitorSocket {
|
|||||||
}
|
}
|
||||||
Channel visitor = NettyVisitorPortContext.getVisitor(visitorPort);
|
Channel visitor = NettyVisitorPortContext.getVisitor(visitorPort);
|
||||||
if (visitor != null) {
|
if (visitor != null) {
|
||||||
|
|
||||||
// close channel
|
// close channel
|
||||||
visitor.close();
|
visitor.close();
|
||||||
// remove visitor
|
NettyPermeateVisitorContext.removePermeateVisitorSockets(visitorPort);
|
||||||
NettyVisitorPortContext.removeVisitor(visitorPort);
|
|
||||||
|
|
||||||
// log.warn("关闭客户端 :【{}】 访客户端口:【{}】", clientId, visitorPort);
|
// log.warn("关闭客户端 :【{}】 访客户端口:【{}】", clientId, visitorPort);
|
||||||
} else {
|
} else {
|
||||||
log.warn("关闭内网渗透端口失败 渗透端口:【{}】", visitorPort);
|
log.warn("关闭内网渗透端口失败 渗透端口:【{}】", visitorPort);
|
||||||
@ -106,7 +104,7 @@ public class NettyPermeateVisitorSocket {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static final class NettyVisitorSocketBuilder {
|
public static final class NettyPermeateVisitorSocketBuilder {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -134,8 +132,8 @@ public class NettyPermeateVisitorSocket {
|
|||||||
*/
|
*/
|
||||||
private ChannelFlowAdapter channelFlowAdapter;
|
private ChannelFlowAdapter channelFlowAdapter;
|
||||||
|
|
||||||
public static NettyPermeateVisitorSocket.NettyVisitorSocketBuilder builder() {
|
public static NettyPermeateVisitorSocketBuilder builder() {
|
||||||
return new NettyPermeateVisitorSocket.NettyVisitorSocketBuilder();
|
return new NettyPermeateVisitorSocketBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -144,7 +142,7 @@ public class NettyPermeateVisitorSocket {
|
|||||||
* @param clientTargetIp 客户端目标IP
|
* @param clientTargetIp 客户端目标IP
|
||||||
* @return 当前对象
|
* @return 当前对象
|
||||||
*/
|
*/
|
||||||
public NettyPermeateVisitorSocket.NettyVisitorSocketBuilder builderClientTargetIp(String clientTargetIp) {
|
public NettyPermeateVisitorSocketBuilder builderClientTargetIp(String clientTargetIp) {
|
||||||
this.clientTargetIp = clientTargetIp;
|
this.clientTargetIp = clientTargetIp;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -155,7 +153,7 @@ public class NettyPermeateVisitorSocket {
|
|||||||
* @param clientTargetPort 客户端目标端口
|
* @param clientTargetPort 客户端目标端口
|
||||||
* @return 当前对象
|
* @return 当前对象
|
||||||
*/
|
*/
|
||||||
public NettyPermeateVisitorSocket.NettyVisitorSocketBuilder builderClientTargetPort(Integer clientTargetPort) {
|
public NettyPermeateVisitorSocketBuilder builderClientTargetPort(Integer clientTargetPort) {
|
||||||
this.clientTargetPort = clientTargetPort;
|
this.clientTargetPort = clientTargetPort;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -166,7 +164,7 @@ public class NettyPermeateVisitorSocket {
|
|||||||
* @param permeateVisitorPort 访客端口
|
* @param permeateVisitorPort 访客端口
|
||||||
* @return 当前对象
|
* @return 当前对象
|
||||||
*/
|
*/
|
||||||
public NettyPermeateVisitorSocket.NettyVisitorSocketBuilder builderVisitorPort(Integer permeateVisitorPort) {
|
public NettyPermeateVisitorSocketBuilder builderVisitorPort(Integer permeateVisitorPort) {
|
||||||
this.permeateVisitorPort = permeateVisitorPort;
|
this.permeateVisitorPort = permeateVisitorPort;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -177,7 +175,7 @@ public class NettyPermeateVisitorSocket {
|
|||||||
* @param channelFlowAdapter 流量适配器
|
* @param channelFlowAdapter 流量适配器
|
||||||
* @return 当前对象
|
* @return 当前对象
|
||||||
*/
|
*/
|
||||||
public NettyPermeateVisitorSocket.NettyVisitorSocketBuilder builderChannelFlowAdapter(ChannelFlowAdapter channelFlowAdapter) {
|
public NettyPermeateVisitorSocketBuilder builderChannelFlowAdapter(ChannelFlowAdapter channelFlowAdapter) {
|
||||||
this.channelFlowAdapter = channelFlowAdapter;
|
this.channelFlowAdapter = channelFlowAdapter;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -188,7 +186,7 @@ public class NettyPermeateVisitorSocket {
|
|||||||
* @param visitorId 访客ID
|
* @param visitorId 访客ID
|
||||||
* @return 当前对象
|
* @return 当前对象
|
||||||
*/
|
*/
|
||||||
public NettyPermeateVisitorSocket.NettyVisitorSocketBuilder builderVisitorId(String visitorId) {
|
public NettyPermeateVisitorSocketBuilder builderVisitorId(String visitorId) {
|
||||||
this.visitorId = visitorId;
|
this.visitorId = visitorId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,115 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application;
|
||||||
|
|
||||||
|
import org.wu.framework.web.response.Result;
|
||||||
|
import org.wu.framework.web.response.ResultFactory;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMapping;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingRemoveCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingStoryCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingUpdateCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingQueryListCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingQueryOneCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.dto.LazyInternalNetworkServerPermeateMappingDTO;
|
||||||
|
import java.util.List;
|
||||||
|
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyApplication
|
||||||
|
**/
|
||||||
|
|
||||||
|
public interface LazyInternalNetworkServerPermeateMappingApplication {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingStoryCommand 新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射新增后领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<LazyInternalNetworkServerPermeateMapping> story(LazyInternalNetworkServerPermeateMappingStoryCommand lazyInternalNetworkServerPermeateMappingStoryCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 批量新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingStoryCommandList 批量新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<List<LazyInternalNetworkServerPermeateMapping>>} 服务端网络渗透映射新增后领域对象集合
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<List<LazyInternalNetworkServerPermeateMapping>> batchStory(List<LazyInternalNetworkServerPermeateMappingStoryCommand> lazyInternalNetworkServerPermeateMappingStoryCommandList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 更新服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingUpdateCommand 更新服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<LazyInternalNetworkServerPermeateMapping> updateOne(LazyInternalNetworkServerPermeateMappingUpdateCommand lazyInternalNetworkServerPermeateMappingUpdateCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 查询单个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryOneCommand 查询单个服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMappingDTO>} 服务端网络渗透映射DTO对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<LazyInternalNetworkServerPermeateMappingDTO> findOne(LazyInternalNetworkServerPermeateMappingQueryOneCommand lazyInternalNetworkServerPermeateMappingQueryOneCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryListCommand 查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result <List<LazyInternalNetworkServerPermeateMappingDTO>>} 服务端网络渗透映射DTO对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result <List<LazyInternalNetworkServerPermeateMappingDTO>> findList(LazyInternalNetworkServerPermeateMappingQueryListCommand lazyInternalNetworkServerPermeateMappingQueryListCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 分页查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryListCommand 分页查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result <LazyPage<LazyInternalNetworkServerPermeateMappingDTO>>} 分页服务端网络渗透映射DTO对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result <LazyPage<LazyInternalNetworkServerPermeateMappingDTO>> findPage(int size,int current,LazyInternalNetworkServerPermeateMappingQueryListCommand lazyInternalNetworkServerPermeateMappingQueryListCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 删除服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingRemoveCommand 删除服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<LazyInternalNetworkServerPermeateMapping> remove(LazyInternalNetworkServerPermeateMappingRemoveCommand lazyInternalNetworkServerPermeateMappingRemoveCommand);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化 网络渗透socket
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Result<?> initPermeateSocket();
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.assembler;
|
||||||
|
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMapping;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingRemoveCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingStoryCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingUpdateCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingQueryListCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingQueryOneCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.dto.LazyInternalNetworkServerPermeateMappingDTO;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyAssembler
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface LazyInternalNetworkServerPermeateMappingDTOAssembler {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe MapStruct 创建的代理对象
|
||||||
|
*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMappingDTOAssembler INSTANCE = Mappers.getMapper(LazyInternalNetworkServerPermeateMappingDTOAssembler.class);
|
||||||
|
/**
|
||||||
|
* describe 应用层存储入参转换成 领域对象
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingStoryCommand 保存服务端网络渗透映射对象
|
||||||
|
* @return {@link LazyInternalNetworkServerPermeateMapping} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMapping toLazyInternalNetworkServerPermeateMapping(LazyInternalNetworkServerPermeateMappingStoryCommand lazyInternalNetworkServerPermeateMappingStoryCommand);
|
||||||
|
/**
|
||||||
|
* describe 应用层更新入参转换成 领域对象
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingUpdateCommand 更新服务端网络渗透映射对象
|
||||||
|
* @return {@link LazyInternalNetworkServerPermeateMapping} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMapping toLazyInternalNetworkServerPermeateMapping(LazyInternalNetworkServerPermeateMappingUpdateCommand lazyInternalNetworkServerPermeateMappingUpdateCommand);
|
||||||
|
/**
|
||||||
|
* describe 应用层查询入参转换成 领域对象
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryOneCommand 查询单个服务端网络渗透映射对象参数
|
||||||
|
* @return {@link LazyInternalNetworkServerPermeateMapping} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMapping toLazyInternalNetworkServerPermeateMapping(LazyInternalNetworkServerPermeateMappingQueryOneCommand lazyInternalNetworkServerPermeateMappingQueryOneCommand);
|
||||||
|
/**
|
||||||
|
* describe 应用层查询入参转换成 领域对象
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryListCommand 查询集合服务端网络渗透映射对象参数
|
||||||
|
* @return {@link LazyInternalNetworkServerPermeateMapping} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMapping toLazyInternalNetworkServerPermeateMapping(LazyInternalNetworkServerPermeateMappingQueryListCommand lazyInternalNetworkServerPermeateMappingQueryListCommand);
|
||||||
|
/**
|
||||||
|
* describe 应用层删除入参转换成 领域对象
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingRemoveCommand 删除服务端网络渗透映射对象参数
|
||||||
|
* @return {@link LazyInternalNetworkServerPermeateMapping} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMapping toLazyInternalNetworkServerPermeateMapping(LazyInternalNetworkServerPermeateMappingRemoveCommand lazyInternalNetworkServerPermeateMappingRemoveCommand);
|
||||||
|
/**
|
||||||
|
* describe 持久层领域对象转换成DTO对象
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 服务端网络渗透映射领域对象
|
||||||
|
* @return {@link LazyInternalNetworkServerPermeateMappingDTO} 服务端网络渗透映射DTO对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMappingDTO fromLazyInternalNetworkServerPermeateMapping(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping);
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Boolean;
|
||||||
|
import java.lang.Integer;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyQueryListCommand
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Schema(title = "lazy_internal_network_server_permeate_mapping_query_List_command",description = "服务端网络渗透映射")
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingQueryListCommand {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="createTime",example = "")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@Schema(description ="描述",name ="describe",example = "")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="id",example = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 是否删除 默认否
|
||||||
|
*/
|
||||||
|
@Schema(description ="是否删除 默认否",name ="isDeleted",example = "")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标地址
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标地址",name ="permeateTargetIp",example = "")
|
||||||
|
private String permeateTargetIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标端口",name ="permeateTargetPort",example = "")
|
||||||
|
private Integer permeateTargetPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 服务端ID
|
||||||
|
*/
|
||||||
|
@Schema(description ="服务端ID",name ="serverId",example = "")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="updateTime",example = "")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透端口",name ="visitorPort",example = "")
|
||||||
|
private Integer visitorPort;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Boolean;
|
||||||
|
import java.lang.Integer;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyQueryOneCommand
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Schema(title = "lazy_internal_network_server_permeate_mapping_query_one_command",description = "服务端网络渗透映射")
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingQueryOneCommand {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="createTime",example = "")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@Schema(description ="描述",name ="describe",example = "")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="id",example = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 是否删除 默认否
|
||||||
|
*/
|
||||||
|
@Schema(description ="是否删除 默认否",name ="isDeleted",example = "")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标地址
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标地址",name ="permeateTargetIp",example = "")
|
||||||
|
private String permeateTargetIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标端口",name ="permeateTargetPort",example = "")
|
||||||
|
private Integer permeateTargetPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 服务端ID
|
||||||
|
*/
|
||||||
|
@Schema(description ="服务端ID",name ="serverId",example = "")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="updateTime",example = "")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透端口",name ="visitorPort",example = "")
|
||||||
|
private Integer visitorPort;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Boolean;
|
||||||
|
import java.lang.Integer;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyRemoveCommand
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Schema(title = "lazy_internal_network_server_permeate_mapping_remove_command",description = "服务端网络渗透映射")
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingRemoveCommand {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="createTime",example = "")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@Schema(description ="描述",name ="describe",example = "")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="id",example = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 是否删除 默认否
|
||||||
|
*/
|
||||||
|
@Schema(description ="是否删除 默认否",name ="isDeleted",example = "")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标地址
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标地址",name ="permeateTargetIp",example = "")
|
||||||
|
private String permeateTargetIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标端口",name ="permeateTargetPort",example = "")
|
||||||
|
private Integer permeateTargetPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 服务端ID
|
||||||
|
*/
|
||||||
|
@Schema(description ="服务端ID",name ="serverId",example = "")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="updateTime",example = "")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透端口",name ="visitorPort",example = "")
|
||||||
|
private Integer visitorPort;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Boolean;
|
||||||
|
import java.lang.Integer;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyStoryCommand
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Schema(title = "lazy_internal_network_server_permeate_mapping_story_command",description = "服务端网络渗透映射")
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingStoryCommand {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="createTime",example = "")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@Schema(description ="描述",name ="describe",example = "")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="id",example = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 是否删除 默认否
|
||||||
|
*/
|
||||||
|
@Schema(description ="是否删除 默认否",name ="isDeleted",example = "")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标地址
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标地址",name ="permeateTargetIp",example = "")
|
||||||
|
private String permeateTargetIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标端口",name ="permeateTargetPort",example = "")
|
||||||
|
private Integer permeateTargetPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 服务端ID
|
||||||
|
*/
|
||||||
|
@Schema(description ="服务端ID",name ="serverId",example = "")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="updateTime",example = "")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透端口",name ="visitorPort",example = "")
|
||||||
|
private Integer visitorPort;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Boolean;
|
||||||
|
import java.lang.Integer;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyUpdateCommand
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Schema(title = "lazy_internal_network_server_permeate_mapping_update_command",description = "服务端网络渗透映射")
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingUpdateCommand {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="createTime",example = "")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@Schema(description ="描述",name ="describe",example = "")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="id",example = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 是否删除 默认否
|
||||||
|
*/
|
||||||
|
@Schema(description ="是否删除 默认否",name ="isDeleted",example = "")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标地址
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标地址",name ="permeateTargetIp",example = "")
|
||||||
|
private String permeateTargetIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标端口",name ="permeateTargetPort",example = "")
|
||||||
|
private Integer permeateTargetPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 服务端ID
|
||||||
|
*/
|
||||||
|
@Schema(description ="服务端ID",name ="serverId",example = "")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="updateTime",example = "")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透端口",name ="visitorPort",example = "")
|
||||||
|
private Integer visitorPort;
|
||||||
|
|
||||||
|
}
|
@ -20,14 +20,6 @@ import java.lang.Integer;
|
|||||||
@Schema(title = "lazy_netty_server_permeate_port_pool_query_List_command",description = "服务端内网渗透端口池")
|
@Schema(title = "lazy_netty_server_permeate_port_pool_query_List_command",description = "服务端内网渗透端口池")
|
||||||
public class LazyNettyServerPermeatePortPoolQueryListCommand {
|
public class LazyNettyServerPermeatePortPoolQueryListCommand {
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 客户端ID
|
|
||||||
*/
|
|
||||||
@Schema(description ="客户端ID",name ="clientId",example = "")
|
|
||||||
private String clientId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 创建时间
|
* 创建时间
|
||||||
|
@ -21,13 +21,6 @@ import java.lang.Integer;
|
|||||||
public class LazyNettyServerPermeatePortPoolQueryOneCommand {
|
public class LazyNettyServerPermeatePortPoolQueryOneCommand {
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 客户端ID
|
|
||||||
*/
|
|
||||||
@Schema(description ="客户端ID",name ="clientId",example = "")
|
|
||||||
private String clientId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 创建时间
|
* 创建时间
|
||||||
|
@ -21,13 +21,6 @@ import java.lang.Integer;
|
|||||||
public class LazyNettyServerPermeatePortPoolRemoveCommand {
|
public class LazyNettyServerPermeatePortPoolRemoveCommand {
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 客户端ID
|
|
||||||
*/
|
|
||||||
@Schema(description ="客户端ID",name ="clientId",example = "")
|
|
||||||
private String clientId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 创建时间
|
* 创建时间
|
||||||
|
@ -21,13 +21,6 @@ import java.lang.Integer;
|
|||||||
public class LazyNettyServerPermeatePortPoolStoryCommand {
|
public class LazyNettyServerPermeatePortPoolStoryCommand {
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 客户端ID
|
|
||||||
*/
|
|
||||||
@Schema(description ="客户端ID",name ="clientId",example = "")
|
|
||||||
private String clientId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 创建时间
|
* 创建时间
|
||||||
|
@ -21,13 +21,6 @@ import java.lang.Integer;
|
|||||||
public class LazyNettyServerPermeatePortPoolUpdateCommand {
|
public class LazyNettyServerPermeatePortPoolUpdateCommand {
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 客户端ID
|
|
||||||
*/
|
|
||||||
@Schema(description ="客户端ID",name ="clientId",example = "")
|
|
||||||
private String clientId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 创建时间
|
* 创建时间
|
||||||
|
@ -0,0 +1,87 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Boolean;
|
||||||
|
import java.lang.Integer;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyDTO
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Schema(title = "lazy_internal_network_server_permeate_mapping_command_dto",description = "服务端网络渗透映射")
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingDTO {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="createTime",example = "")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@Schema(description ="描述",name ="describe",example = "")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="id",example = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 是否删除 默认否
|
||||||
|
*/
|
||||||
|
@Schema(description ="是否删除 默认否",name ="isDeleted",example = "")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标地址
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标地址",name ="permeateTargetIp",example = "")
|
||||||
|
private String permeateTargetIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标端口",name ="permeateTargetPort",example = "")
|
||||||
|
private Integer permeateTargetPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 服务端ID
|
||||||
|
*/
|
||||||
|
@Schema(description ="服务端ID",name ="serverId",example = "")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="updateTime",example = "")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透端口",name ="visitorPort",example = "")
|
||||||
|
private Integer visitorPort;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,256 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.impl;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.common.NettyPermeateVisitorContext;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelFlowAdapter;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.netty.socket.NettyPermeateVisitorSocket;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.properties.ServerNodeProperties;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.LazyInternalNetworkServerPermeateMappingApplication;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.assembler.LazyInternalNetworkServerPermeateMappingDTOAssembler;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.*;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.dto.LazyInternalNetworkServerPermeateMappingDTO;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMapping;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingRepository;
|
||||||
|
import org.wu.framework.core.utils.ObjectUtils;
|
||||||
|
import org.wu.framework.database.lazy.web.plus.stereotype.LazyApplication;
|
||||||
|
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
|
||||||
|
import org.wu.framework.web.response.Result;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyApplicationImpl
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@LazyApplication
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingApplicationImpl implements LazyInternalNetworkServerPermeateMappingApplication {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
LazyInternalNetworkServerPermeateMappingRepository lazyInternalNetworkServerPermeateMappingRepository;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ServerNodeProperties serverNodeProperties;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ChannelFlowAdapter channelFlowAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingStoryCommand 新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射新增后领域对象
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMapping> story(LazyInternalNetworkServerPermeateMappingStoryCommand lazyInternalNetworkServerPermeateMappingStoryCommand) {
|
||||||
|
LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping = LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE.toLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMappingStoryCommand);
|
||||||
|
String serverId = serverNodeProperties.getNodeId();
|
||||||
|
lazyInternalNetworkServerPermeateMapping.setServerId(serverId);
|
||||||
|
// 开启端口
|
||||||
|
String permeateTargetIp = lazyInternalNetworkServerPermeateMapping.getPermeateTargetIp();
|
||||||
|
Integer permeateTargetPort = lazyInternalNetworkServerPermeateMapping.getPermeateTargetPort();
|
||||||
|
Integer visitorPort = lazyInternalNetworkServerPermeateMapping.getVisitorPort();
|
||||||
|
this.changePermeateSocket(permeateTargetIp, permeateTargetPort, visitorPort);
|
||||||
|
return lazyInternalNetworkServerPermeateMappingRepository.story(lazyInternalNetworkServerPermeateMapping);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 批量新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingStoryCommandList 批量新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<List<LazyInternalNetworkServerPermeateMapping>>} 服务端网络渗透映射新增后领域对象集合
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<LazyInternalNetworkServerPermeateMapping>> batchStory(List<LazyInternalNetworkServerPermeateMappingStoryCommand> lazyInternalNetworkServerPermeateMappingStoryCommandList) {
|
||||||
|
List<LazyInternalNetworkServerPermeateMapping> lazyInternalNetworkServerPermeateMappingList = lazyInternalNetworkServerPermeateMappingStoryCommandList.stream().map(LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE::toLazyInternalNetworkServerPermeateMapping).collect(Collectors.toList());
|
||||||
|
for (LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping : lazyInternalNetworkServerPermeateMappingList) {
|
||||||
|
String serverId = serverNodeProperties.getNodeId();
|
||||||
|
lazyInternalNetworkServerPermeateMapping.setServerId(serverId);
|
||||||
|
// 开启端口
|
||||||
|
String permeateTargetIp = lazyInternalNetworkServerPermeateMapping.getPermeateTargetIp();
|
||||||
|
Integer permeateTargetPort = lazyInternalNetworkServerPermeateMapping.getPermeateTargetPort();
|
||||||
|
Integer visitorPort = lazyInternalNetworkServerPermeateMapping.getVisitorPort();
|
||||||
|
this.changePermeateSocket(permeateTargetIp, permeateTargetPort, visitorPort);
|
||||||
|
}
|
||||||
|
return lazyInternalNetworkServerPermeateMappingRepository.batchStory(lazyInternalNetworkServerPermeateMappingList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 更新服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingUpdateCommand 更新服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射领域对象
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMapping> updateOne(LazyInternalNetworkServerPermeateMappingUpdateCommand lazyInternalNetworkServerPermeateMappingUpdateCommand) {
|
||||||
|
LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping = LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE.toLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMappingUpdateCommand);
|
||||||
|
String serverId = serverNodeProperties.getNodeId();
|
||||||
|
lazyInternalNetworkServerPermeateMapping.setServerId(serverId);
|
||||||
|
// 开启端口
|
||||||
|
String permeateTargetIp = lazyInternalNetworkServerPermeateMapping.getPermeateTargetIp();
|
||||||
|
Integer permeateTargetPort = lazyInternalNetworkServerPermeateMapping.getPermeateTargetPort();
|
||||||
|
Integer visitorPort = lazyInternalNetworkServerPermeateMapping.getVisitorPort();
|
||||||
|
this.changePermeateSocket(permeateTargetIp, permeateTargetPort, visitorPort);
|
||||||
|
return lazyInternalNetworkServerPermeateMappingRepository.story(lazyInternalNetworkServerPermeateMapping);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 查询单个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryOneCommand 查询单个服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMappingDTO>} 服务端网络渗透映射DTO对象
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMappingDTO> findOne(LazyInternalNetworkServerPermeateMappingQueryOneCommand lazyInternalNetworkServerPermeateMappingQueryOneCommand) {
|
||||||
|
LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping = LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE.toLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMappingQueryOneCommand);
|
||||||
|
return lazyInternalNetworkServerPermeateMappingRepository.findOne(lazyInternalNetworkServerPermeateMapping).convert(LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE::fromLazyInternalNetworkServerPermeateMapping);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryListCommand 查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result<List<LazyInternalNetworkServerPermeateMappingDTO>>} 服务端网络渗透映射DTO对象
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<LazyInternalNetworkServerPermeateMappingDTO>> findList(LazyInternalNetworkServerPermeateMappingQueryListCommand lazyInternalNetworkServerPermeateMappingQueryListCommand) {
|
||||||
|
LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping = LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE.toLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMappingQueryListCommand);
|
||||||
|
return lazyInternalNetworkServerPermeateMappingRepository.findList(lazyInternalNetworkServerPermeateMapping).convert(lazyInternalNetworkServerPermeateMappings -> lazyInternalNetworkServerPermeateMappings.stream().map(LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE::fromLazyInternalNetworkServerPermeateMapping).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 分页查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryListCommand 分页查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyPage<LazyInternalNetworkServerPermeateMappingDTO>>} 分页服务端网络渗透映射DTO对象
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<LazyPage<LazyInternalNetworkServerPermeateMappingDTO>> findPage(int size, int current, LazyInternalNetworkServerPermeateMappingQueryListCommand lazyInternalNetworkServerPermeateMappingQueryListCommand) {
|
||||||
|
LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping = LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE.toLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMappingQueryListCommand);
|
||||||
|
return lazyInternalNetworkServerPermeateMappingRepository.findPage(size, current, lazyInternalNetworkServerPermeateMapping).convert(page -> page.convert(LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE::fromLazyInternalNetworkServerPermeateMapping));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 删除服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingRemoveCommand 删除服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMapping> remove(LazyInternalNetworkServerPermeateMappingRemoveCommand lazyInternalNetworkServerPermeateMappingRemoveCommand) {
|
||||||
|
LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping = LazyInternalNetworkServerPermeateMappingDTOAssembler.INSTANCE.toLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMappingRemoveCommand);
|
||||||
|
// 开启端口
|
||||||
|
Integer visitorPort = lazyInternalNetworkServerPermeateMapping.getVisitorPort();
|
||||||
|
this.closePermeateSocket(visitorPort);
|
||||||
|
return lazyInternalNetworkServerPermeateMappingRepository.remove(lazyInternalNetworkServerPermeateMapping);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化 网络渗透socket
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Result<?> initPermeateSocket() {
|
||||||
|
// 查询所有的服务端渗透配置
|
||||||
|
LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping = new LazyInternalNetworkServerPermeateMapping();
|
||||||
|
return lazyInternalNetworkServerPermeateMappingRepository.findList(lazyInternalNetworkServerPermeateMapping)
|
||||||
|
.accept(lazyInternalNetworkServerPermeateMappings -> {
|
||||||
|
// 开启映射
|
||||||
|
for (LazyInternalNetworkServerPermeateMapping internalNetworkServerPermeateMapping : lazyInternalNetworkServerPermeateMappings) {
|
||||||
|
|
||||||
|
String permeateTargetIp = internalNetworkServerPermeateMapping.getPermeateTargetIp();
|
||||||
|
Integer permeateTargetPort = internalNetworkServerPermeateMapping.getPermeateTargetPort();
|
||||||
|
Integer visitorPort = internalNetworkServerPermeateMapping.getVisitorPort();
|
||||||
|
log.info("init permeate socket ip:{}, port:{},visitorPort:{}", permeateTargetIp, permeateTargetPort, visitorPort);
|
||||||
|
this.createPermeateVisitor(permeateTargetIp, permeateTargetPort, visitorPort);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更 网络穿透
|
||||||
|
*
|
||||||
|
* @param permeateTargetIp 客户端目标IP
|
||||||
|
* @param permeateTargetPort 客户端莫表端口
|
||||||
|
* @param visitorPort 访客端口
|
||||||
|
*/
|
||||||
|
private void changePermeateSocket(String permeateTargetIp, Integer permeateTargetPort, Integer visitorPort) {
|
||||||
|
// 删除 客户端映射
|
||||||
|
this.closePermeateSocket(visitorPort);
|
||||||
|
// 更新 客户端映射
|
||||||
|
createPermeateVisitor(permeateTargetIp, permeateTargetPort, visitorPort);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除 通道
|
||||||
|
*
|
||||||
|
* @param visitorPort 访客端口
|
||||||
|
*/
|
||||||
|
private void closePermeateSocket(Integer visitorPort) {
|
||||||
|
// 删除 客户端映射
|
||||||
|
NettyPermeateVisitorSocket nettyPermeateVisitorSocket = NettyPermeateVisitorContext.getPermeateVisitorSocket(visitorPort);
|
||||||
|
if (!ObjectUtils.isEmpty(nettyPermeateVisitorSocket)) {
|
||||||
|
// 关闭端口
|
||||||
|
try {
|
||||||
|
nettyPermeateVisitorSocket.close();
|
||||||
|
} catch (IOException | InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建访客
|
||||||
|
*
|
||||||
|
* @param permeateTargetIp 客户端目标IP
|
||||||
|
* @param permeateTargetPort 客户端目标端口
|
||||||
|
* @param visitorPort 访客端口
|
||||||
|
*/
|
||||||
|
private void createPermeateVisitor(String permeateTargetIp, Integer permeateTargetPort, Integer visitorPort) {
|
||||||
|
// 更新 客户端映射
|
||||||
|
NettyPermeateVisitorSocket nettyPermeateVisitorSocket = NettyPermeateVisitorSocket.NettyPermeateVisitorSocketBuilder
|
||||||
|
.builder()
|
||||||
|
.builderClientTargetIp(permeateTargetIp)
|
||||||
|
.builderClientTargetPort(permeateTargetPort)
|
||||||
|
.builderVisitorPort(visitorPort)
|
||||||
|
.builderChannelFlowAdapter(channelFlowAdapter)
|
||||||
|
.build();
|
||||||
|
try {
|
||||||
|
nettyPermeateVisitorSocket.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("内网渗透,网络端口:{},开放失败", visitorPort);
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.impl;
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.application.impl;
|
||||||
|
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.properties.ServerNodeProperties;
|
||||||
import org.wu.framework.database.lazy.web.plus.stereotype.LazyApplication;
|
import org.wu.framework.database.lazy.web.plus.stereotype.LazyApplication;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.LazyNettyServerPermeatePortPoolApplication;
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.LazyNettyServerPermeatePortPoolApplication;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -31,6 +32,10 @@ public class LazyNettyServerPermeatePortPoolApplicationImpl implements LazyNetty
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
LazyNettyServerPermeatePortPoolRepository lazyNettyServerPermeatePortPoolRepository;
|
LazyNettyServerPermeatePortPoolRepository lazyNettyServerPermeatePortPoolRepository;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ServerNodeProperties serverNodeProperties;
|
||||||
/**
|
/**
|
||||||
* describe 新增服务端内网渗透端口池
|
* describe 新增服务端内网渗透端口池
|
||||||
*
|
*
|
||||||
@ -44,6 +49,8 @@ public class LazyNettyServerPermeatePortPoolApplicationImpl implements LazyNetty
|
|||||||
@Override
|
@Override
|
||||||
public Result<LazyNettyServerPermeatePortPool> story(LazyNettyServerPermeatePortPoolStoryCommand lazyNettyServerPermeatePortPoolStoryCommand) {
|
public Result<LazyNettyServerPermeatePortPool> story(LazyNettyServerPermeatePortPoolStoryCommand lazyNettyServerPermeatePortPoolStoryCommand) {
|
||||||
LazyNettyServerPermeatePortPool lazyNettyServerPermeatePortPool = LazyNettyServerPermeatePortPoolDTOAssembler.INSTANCE.toLazyNettyServerPermeatePortPool(lazyNettyServerPermeatePortPoolStoryCommand);
|
LazyNettyServerPermeatePortPool lazyNettyServerPermeatePortPool = LazyNettyServerPermeatePortPoolDTOAssembler.INSTANCE.toLazyNettyServerPermeatePortPool(lazyNettyServerPermeatePortPoolStoryCommand);
|
||||||
|
String serverId = serverNodeProperties.getNodeId();
|
||||||
|
lazyNettyServerPermeatePortPool.setServerId(serverId);
|
||||||
return lazyNettyServerPermeatePortPoolRepository.story(lazyNettyServerPermeatePortPool);
|
return lazyNettyServerPermeatePortPoolRepository.story(lazyNettyServerPermeatePortPool);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -59,6 +66,10 @@ public class LazyNettyServerPermeatePortPoolApplicationImpl implements LazyNetty
|
|||||||
@Override
|
@Override
|
||||||
public Result<List<LazyNettyServerPermeatePortPool>> batchStory(List<LazyNettyServerPermeatePortPoolStoryCommand> lazyNettyServerPermeatePortPoolStoryCommandList) {
|
public Result<List<LazyNettyServerPermeatePortPool>> batchStory(List<LazyNettyServerPermeatePortPoolStoryCommand> lazyNettyServerPermeatePortPoolStoryCommandList) {
|
||||||
List<LazyNettyServerPermeatePortPool> lazyNettyServerPermeatePortPoolList = lazyNettyServerPermeatePortPoolStoryCommandList.stream().map( LazyNettyServerPermeatePortPoolDTOAssembler.INSTANCE::toLazyNettyServerPermeatePortPool).collect(Collectors.toList());
|
List<LazyNettyServerPermeatePortPool> lazyNettyServerPermeatePortPoolList = lazyNettyServerPermeatePortPoolStoryCommandList.stream().map( LazyNettyServerPermeatePortPoolDTOAssembler.INSTANCE::toLazyNettyServerPermeatePortPool).collect(Collectors.toList());
|
||||||
|
for (LazyNettyServerPermeatePortPool lazyNettyServerPermeatePortPool : lazyNettyServerPermeatePortPoolList) {
|
||||||
|
String serverId = serverNodeProperties.getNodeId();
|
||||||
|
lazyNettyServerPermeatePortPool.setServerId(serverId);
|
||||||
|
}
|
||||||
return lazyNettyServerPermeatePortPoolRepository.batchStory(lazyNettyServerPermeatePortPoolList);
|
return lazyNettyServerPermeatePortPoolRepository.batchStory(lazyNettyServerPermeatePortPoolList);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -74,6 +85,8 @@ public class LazyNettyServerPermeatePortPoolApplicationImpl implements LazyNetty
|
|||||||
@Override
|
@Override
|
||||||
public Result<LazyNettyServerPermeatePortPool> updateOne(LazyNettyServerPermeatePortPoolUpdateCommand lazyNettyServerPermeatePortPoolUpdateCommand) {
|
public Result<LazyNettyServerPermeatePortPool> updateOne(LazyNettyServerPermeatePortPoolUpdateCommand lazyNettyServerPermeatePortPoolUpdateCommand) {
|
||||||
LazyNettyServerPermeatePortPool lazyNettyServerPermeatePortPool = LazyNettyServerPermeatePortPoolDTOAssembler.INSTANCE.toLazyNettyServerPermeatePortPool(lazyNettyServerPermeatePortPoolUpdateCommand);
|
LazyNettyServerPermeatePortPool lazyNettyServerPermeatePortPool = LazyNettyServerPermeatePortPoolDTOAssembler.INSTANCE.toLazyNettyServerPermeatePortPool(lazyNettyServerPermeatePortPoolUpdateCommand);
|
||||||
|
String serverId = serverNodeProperties.getNodeId();
|
||||||
|
lazyNettyServerPermeatePortPool.setServerId(serverId);
|
||||||
return lazyNettyServerPermeatePortPoolRepository.story(lazyNettyServerPermeatePortPool);
|
return lazyNettyServerPermeatePortPoolRepository.story(lazyNettyServerPermeatePortPool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,142 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import org.wu.framework.web.spring.EasyController;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wu.framework.web.response.Result;
|
||||||
|
import org.wu.framework.web.response.ResultFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMapping;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingRemoveCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingStoryCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingUpdateCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingQueryListCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingQueryOneCommand;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.LazyInternalNetworkServerPermeateMappingApplication;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.dto.LazyInternalNetworkServerPermeateMappingDTO;
|
||||||
|
import java.util.List;
|
||||||
|
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyController
|
||||||
|
**/
|
||||||
|
@Tag(name = "服务端网络渗透映射提供者")
|
||||||
|
@EasyController("/lazy/internal/network/server/permeate/mapping")
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingProvider {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private LazyInternalNetworkServerPermeateMappingApplication lazyInternalNetworkServerPermeateMappingApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingStoryCommand 新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射新增后领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Operation(summary = "新增服务端网络渗透映射")
|
||||||
|
@PostMapping("/story")
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMapping> story(@RequestBody LazyInternalNetworkServerPermeateMappingStoryCommand lazyInternalNetworkServerPermeateMappingStoryCommand){
|
||||||
|
return lazyInternalNetworkServerPermeateMappingApplication.story(lazyInternalNetworkServerPermeateMappingStoryCommand);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* describe 批量新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingStoryCommandList 批量新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<List<LazyInternalNetworkServerPermeateMapping>>} 服务端网络渗透映射新增后领域对象集合
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Operation(summary = "批量新增服务端网络渗透映射")
|
||||||
|
@PostMapping("/batchStory")
|
||||||
|
public Result<List<LazyInternalNetworkServerPermeateMapping>> batchStory(@RequestBody List<LazyInternalNetworkServerPermeateMappingStoryCommand> lazyInternalNetworkServerPermeateMappingStoryCommandList){
|
||||||
|
return lazyInternalNetworkServerPermeateMappingApplication.batchStory(lazyInternalNetworkServerPermeateMappingStoryCommandList);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* describe 更新服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingUpdateCommand 更新服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Operation(summary = "更新服务端网络渗透映射")
|
||||||
|
@PutMapping("/updateOne")
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMapping> updateOne(@RequestBody LazyInternalNetworkServerPermeateMappingUpdateCommand lazyInternalNetworkServerPermeateMappingUpdateCommand){
|
||||||
|
return lazyInternalNetworkServerPermeateMappingApplication.updateOne(lazyInternalNetworkServerPermeateMappingUpdateCommand);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* describe 查询单个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryOneCommand 查询单个服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMappingDTO>} 服务端网络渗透映射DTO对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Operation(summary = "查询单个服务端网络渗透映射")
|
||||||
|
@GetMapping("/findOne")
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMappingDTO> findOne(@ModelAttribute LazyInternalNetworkServerPermeateMappingQueryOneCommand lazyInternalNetworkServerPermeateMappingQueryOneCommand){
|
||||||
|
return lazyInternalNetworkServerPermeateMappingApplication.findOne(lazyInternalNetworkServerPermeateMappingQueryOneCommand);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* describe 查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryListCommand 查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result<List<LazyInternalNetworkServerPermeateMappingDTO>>} 服务端网络渗透映射DTO对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Operation(summary = "查询多个服务端网络渗透映射")
|
||||||
|
@GetMapping("/findList")
|
||||||
|
public Result<List<LazyInternalNetworkServerPermeateMappingDTO>> findList(@ModelAttribute LazyInternalNetworkServerPermeateMappingQueryListCommand lazyInternalNetworkServerPermeateMappingQueryListCommand){
|
||||||
|
return lazyInternalNetworkServerPermeateMappingApplication.findList(lazyInternalNetworkServerPermeateMappingQueryListCommand);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* describe 分页查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingQueryListCommand 分页查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyPage<LazyInternalNetworkServerPermeateMappingDTO>>} 分页服务端网络渗透映射DTO对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询多个服务端网络渗透映射")
|
||||||
|
@GetMapping("/findPage")
|
||||||
|
public Result<LazyPage<LazyInternalNetworkServerPermeateMappingDTO>> findPage(@Parameter(description ="分页大小") @RequestParam(defaultValue = "10", value = "size") int size,
|
||||||
|
@Parameter(description ="当前页数") @RequestParam(defaultValue = "1", value = "current") int current,@ModelAttribute LazyInternalNetworkServerPermeateMappingQueryListCommand lazyInternalNetworkServerPermeateMappingQueryListCommand){
|
||||||
|
return lazyInternalNetworkServerPermeateMappingApplication.findPage(size,current,lazyInternalNetworkServerPermeateMappingQueryListCommand);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* describe 删除服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingRemoveCommand 删除服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Operation(summary = "删除服务端网络渗透映射")
|
||||||
|
@DeleteMapping("/remove")
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMapping> remove(@ModelAttribute LazyInternalNetworkServerPermeateMappingRemoveCommand lazyInternalNetworkServerPermeateMappingRemoveCommand){
|
||||||
|
return lazyInternalNetworkServerPermeateMappingApplication.remove(lazyInternalNetworkServerPermeateMappingRemoveCommand);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Boolean;
|
||||||
|
import java.lang.Integer;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyDomain
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Schema(title = "lazy_internal_network_server_permeate_mapping",description = "服务端网络渗透映射")
|
||||||
|
public class LazyInternalNetworkServerPermeateMapping {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="createTime",example = "")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@Schema(description ="描述",name ="describe",example = "")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="id",example = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 是否删除 默认否
|
||||||
|
*/
|
||||||
|
@Schema(description ="是否删除 默认否",name ="isDeleted",example = "")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标地址
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标地址",name ="permeateTargetIp",example = "")
|
||||||
|
private String permeateTargetIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标端口",name ="permeateTargetPort",example = "")
|
||||||
|
private Integer permeateTargetPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 服务端ID
|
||||||
|
*/
|
||||||
|
@Schema(description ="服务端ID",name ="serverId",example = "")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="updateTime",example = "")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透端口",name ="visitorPort",example = "")
|
||||||
|
private Integer visitorPort;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,106 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping;
|
||||||
|
|
||||||
|
import org.wu.framework.web.response.Result;
|
||||||
|
import org.wu.framework.web.response.ResultFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMapping;
|
||||||
|
import java.util.List;
|
||||||
|
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyDomainRepository
|
||||||
|
**/
|
||||||
|
|
||||||
|
public interface LazyInternalNetworkServerPermeateMappingRepository {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射新增后领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<LazyInternalNetworkServerPermeateMapping> story(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 批量新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingList 批量新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<List<LazyInternalNetworkServerPermeateMapping>>} 服务端网络渗透映射新增后领域对象集合
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<List<LazyInternalNetworkServerPermeateMapping>> batchStory(List<LazyInternalNetworkServerPermeateMapping> lazyInternalNetworkServerPermeateMappingList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 查询单个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 查询单个服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射DTO对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<LazyInternalNetworkServerPermeateMapping> findOne(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result<List<LazyInternalNetworkServerPermeateMapping>>} 服务端网络渗透映射DTO对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<List<LazyInternalNetworkServerPermeateMapping>> findList(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 分页查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param size 当前页数
|
||||||
|
* @param current 当前页
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 分页查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyPage<LazyInternalNetworkServerPermeateMapping>>} 分页服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<LazyPage<LazyInternalNetworkServerPermeateMapping>> findPage(int size,int current,LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 删除服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 删除服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<LazyInternalNetworkServerPermeateMapping> remove(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 是否存在服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 是否存在服务端网络渗透映射
|
||||||
|
* @return {@link Result<Boolean>} 服务端网络渗透映射是否存在
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
Result<Boolean> exists(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping);
|
||||||
|
|
||||||
|
}
|
@ -21,13 +21,6 @@ import java.lang.Integer;
|
|||||||
public class LazyNettyServerPermeatePortPool {
|
public class LazyNettyServerPermeatePortPool {
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 客户端ID
|
|
||||||
*/
|
|
||||||
@Schema(description ="客户端ID",name ="clientId",example = "")
|
|
||||||
private String clientId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 创建时间
|
* 创建时间
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.converter;
|
||||||
|
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMapping;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.entity.LazyInternalNetworkServerPermeateMappingDO;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyInfrastructureConverter
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface LazyInternalNetworkServerPermeateMappingConverter {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe MapStruct 创建的代理对象
|
||||||
|
*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMappingConverter INSTANCE = Mappers.getMapper(LazyInternalNetworkServerPermeateMappingConverter.class);
|
||||||
|
/**
|
||||||
|
* describe 实体对象 转换成领域对象
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingDO 服务端网络渗透映射实体对象
|
||||||
|
* @return {@link LazyInternalNetworkServerPermeateMapping} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMapping toLazyInternalNetworkServerPermeateMapping(LazyInternalNetworkServerPermeateMappingDO lazyInternalNetworkServerPermeateMappingDO);
|
||||||
|
/**
|
||||||
|
* describe 领域对象 转换成实体对象
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 服务端网络渗透映射领域对象
|
||||||
|
* @return {@link LazyInternalNetworkServerPermeateMappingDO} 服务端网络渗透映射实体对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
LazyInternalNetworkServerPermeateMappingDO fromLazyInternalNetworkServerPermeateMapping(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping);
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.wu.framework.lazy.orm.core.stereotype.LazyTableIndex;
|
||||||
|
import org.wu.framework.core.stereotype.LayerField;
|
||||||
|
import org.wu.framework.core.stereotype.LayerField.LayerFieldType;
|
||||||
|
import org.wu.framework.lazy.orm.core.stereotype.LazyTable;
|
||||||
|
import org.wu.framework.lazy.orm.core.stereotype.LazyTableField;
|
||||||
|
import org.wu.framework.lazy.orm.core.stereotype.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.lang.String;
|
||||||
|
import org.wu.framework.lazy.orm.core.stereotype.LazyTableFieldId;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Boolean;
|
||||||
|
import java.lang.Integer;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyInfrastructureEntity
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@LazyTable(tableName = "lazy_internal_network_server_permeate_mapping",schema = "wu_lazy_cloud_netty_server",comment = "服务端网络渗透映射")
|
||||||
|
@Schema(title = "lazy_internal_network_server_permeate_mapping",description = "服务端网络渗透映射")
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingDO {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="createTime",example = "")
|
||||||
|
@LazyTableField(name="create_time",comment="",defaultValue="CURRENT_TIMESTAMP",upsertStrategy = LazyFieldStrategy.NEVER,columnType="datetime",extra="")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@Schema(description ="描述",name ="describe",example = "")
|
||||||
|
@LazyTableField(name="describe",comment="描述",columnType="varchar(255)")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="id",example = "")
|
||||||
|
@LazyTableFieldId(name = "id", comment = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 是否删除 默认否
|
||||||
|
*/
|
||||||
|
@Schema(description ="是否删除 默认否",name ="isDeleted",example = "")
|
||||||
|
@LazyTableField(name="is_deleted",comment="是否删除 默认否",defaultValue="'0'",upsertStrategy = LazyFieldStrategy.NEVER,columnType="tinyint")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标地址
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标地址",name ="permeateTargetIp",example = "")
|
||||||
|
@LazyTableFieldUnique(name="permeate_target_ip",comment="渗透目标地址",defaultValue="'0.0.0.0'",columnType="varchar(255)")
|
||||||
|
private String permeateTargetIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透目标端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透目标端口",name ="permeateTargetPort",example = "")
|
||||||
|
@LazyTableFieldUnique(name="permeate_target_port",comment="渗透目标端口",notNull=true,columnType="int")
|
||||||
|
private Integer permeateTargetPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 服务端ID
|
||||||
|
*/
|
||||||
|
@Schema(description ="服务端ID",name ="serverId",example = "")
|
||||||
|
@LazyTableField(name="server_id",comment="服务端ID",columnType="varchar(255)")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Schema(description ="",name ="updateTime",example = "")
|
||||||
|
@LazyTableField(name="update_time",comment="",defaultValue="CURRENT_TIMESTAMP",upsertStrategy = LazyFieldStrategy.NEVER,columnType="datetime",extra=" on update CURRENT_TIMESTAMP")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 渗透端口
|
||||||
|
*/
|
||||||
|
@Schema(description ="渗透端口",name ="visitorPort",example = "")
|
||||||
|
@LazyTableFieldUnique(name="visitor_port",comment="渗透端口",notNull=true,columnType="int")
|
||||||
|
private Integer visitorPort;
|
||||||
|
|
||||||
|
}
|
@ -29,15 +29,6 @@ import java.lang.Integer;
|
|||||||
@Schema(title = "lazy_netty_server_permeate_port_pool",description = "服务端内网渗透端口池")
|
@Schema(title = "lazy_netty_server_permeate_port_pool",description = "服务端内网渗透端口池")
|
||||||
public class LazyNettyServerPermeatePortPoolDO {
|
public class LazyNettyServerPermeatePortPoolDO {
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 客户端ID
|
|
||||||
*/
|
|
||||||
@Schema(description ="客户端ID",name ="clientId",example = "")
|
|
||||||
@LazyTableField(name="client_id",comment="客户端ID",notNull=true,columnType="varchar(255)")
|
|
||||||
private String clientId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 创建时间
|
* 创建时间
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.jpa.lazy;
|
||||||
|
|
||||||
|
import org.wu.framework.lazy.orm.database.jpa.repository.LazyJpaRepository;
|
||||||
|
import org.wu.framework.lazy.orm.database.jpa.repository.annotation.*;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.entity.LazyInternalNetworkServerPermeateMappingDO;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyInfrastructureLazyJpa
|
||||||
|
**/
|
||||||
|
@LazyRepository
|
||||||
|
public interface LazyInternalNetworkServerPermeateMappingLazyJpaRepository extends LazyJpaRepository<LazyInternalNetworkServerPermeateMappingDO,Long> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyInfrastructureMapper
|
||||||
|
**/
|
||||||
|
|
||||||
|
public interface LazyInternalNetworkServerPermeateMappingMapper {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,152 @@
|
|||||||
|
package org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.persistence;
|
||||||
|
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.entity.LazyInternalNetworkServerPermeateMappingDO;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.converter.LazyInternalNetworkServerPermeateMappingConverter;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.mapper.LazyInternalNetworkServerPermeateMappingMapper;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import org.wu.framework.lazy.orm.database.lambda.stream.wrapper.LazyWrappers;
|
||||||
|
import org.wu.framework.web.response.Result;
|
||||||
|
import org.wu.framework.web.response.ResultFactory;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMapping;
|
||||||
|
import org.wu.framework.lazy.orm.database.lambda.stream.lambda.LazyLambdaStream;
|
||||||
|
import java.util.List;
|
||||||
|
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
|
||||||
|
/**
|
||||||
|
* describe 服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
* @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyInfrastructurePersistence
|
||||||
|
**/
|
||||||
|
@Repository
|
||||||
|
public class LazyInternalNetworkServerPermeateMappingRepositoryImpl implements LazyInternalNetworkServerPermeateMappingRepository {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
LazyLambdaStream lazyLambdaStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射新增后领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMapping> story(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping) {
|
||||||
|
LazyInternalNetworkServerPermeateMappingDO lazyInternalNetworkServerPermeateMappingDO = LazyInternalNetworkServerPermeateMappingConverter.INSTANCE.fromLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMapping);
|
||||||
|
lazyLambdaStream.upsert(lazyInternalNetworkServerPermeateMappingDO);
|
||||||
|
return ResultFactory.successOf();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 批量新增服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMappingList 批量新增服务端网络渗透映射
|
||||||
|
* @return {@link Result<List<LazyInternalNetworkServerPermeateMapping>>} 服务端网络渗透映射新增后领域对象集合
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<LazyInternalNetworkServerPermeateMapping>> batchStory(List<LazyInternalNetworkServerPermeateMapping> lazyInternalNetworkServerPermeateMappingList) {
|
||||||
|
List<LazyInternalNetworkServerPermeateMappingDO> lazyInternalNetworkServerPermeateMappingDOList = lazyInternalNetworkServerPermeateMappingList.stream().map(LazyInternalNetworkServerPermeateMappingConverter.INSTANCE::fromLazyInternalNetworkServerPermeateMapping).collect(Collectors.toList());
|
||||||
|
lazyLambdaStream.upsert(lazyInternalNetworkServerPermeateMappingDOList);
|
||||||
|
return ResultFactory.successOf();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 查询单个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 查询单个服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMapping> findOne(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping) {
|
||||||
|
LazyInternalNetworkServerPermeateMappingDO lazyInternalNetworkServerPermeateMappingDO = LazyInternalNetworkServerPermeateMappingConverter.INSTANCE.fromLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMapping);
|
||||||
|
LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMappingOne = lazyLambdaStream.selectOne(LazyWrappers.lambdaWrapperBean(lazyInternalNetworkServerPermeateMappingDO), LazyInternalNetworkServerPermeateMapping.class);
|
||||||
|
return ResultFactory.successOf(lazyInternalNetworkServerPermeateMappingOne);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result<List<LazyInternalNetworkServerPermeateMapping>>} 服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<LazyInternalNetworkServerPermeateMapping>> findList(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping) {
|
||||||
|
LazyInternalNetworkServerPermeateMappingDO lazyInternalNetworkServerPermeateMappingDO = LazyInternalNetworkServerPermeateMappingConverter.INSTANCE.fromLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMapping);
|
||||||
|
List<LazyInternalNetworkServerPermeateMapping> lazyInternalNetworkServerPermeateMappingList = lazyLambdaStream.selectList(LazyWrappers.lambdaWrapperBean(lazyInternalNetworkServerPermeateMappingDO), LazyInternalNetworkServerPermeateMapping.class);
|
||||||
|
return ResultFactory.successOf(lazyInternalNetworkServerPermeateMappingList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 分页查询多个服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param size 当前页数
|
||||||
|
* @param current 当前页
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 分页查询多个服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyPage<LazyInternalNetworkServerPermeateMapping>>} 分页服务端网络渗透映射领域对象
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<LazyPage<LazyInternalNetworkServerPermeateMapping>> findPage(int size,int current,LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping) {
|
||||||
|
LazyInternalNetworkServerPermeateMappingDO lazyInternalNetworkServerPermeateMappingDO = LazyInternalNetworkServerPermeateMappingConverter.INSTANCE.fromLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMapping);
|
||||||
|
LazyPage<LazyInternalNetworkServerPermeateMapping> lazyPage = new LazyPage<>(current,size);
|
||||||
|
LazyPage<LazyInternalNetworkServerPermeateMapping> lazyInternalNetworkServerPermeateMappingLazyPage = lazyLambdaStream.selectPage(LazyWrappers.lambdaWrapperBean(lazyInternalNetworkServerPermeateMappingDO),lazyPage, LazyInternalNetworkServerPermeateMapping.class);
|
||||||
|
return ResultFactory.successOf(lazyInternalNetworkServerPermeateMappingLazyPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 删除服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 删除服务端网络渗透映射
|
||||||
|
* @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<LazyInternalNetworkServerPermeateMapping> remove(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping) {
|
||||||
|
LazyInternalNetworkServerPermeateMappingDO lazyInternalNetworkServerPermeateMappingDO = LazyInternalNetworkServerPermeateMappingConverter.INSTANCE.fromLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMapping);
|
||||||
|
// lazyLambdaStream.delete(LazyWrappers.lambdaWrapperBean(lazyInternalNetworkServerPermeateMappingDO));
|
||||||
|
return ResultFactory.successOf();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe 是否存在服务端网络渗透映射
|
||||||
|
*
|
||||||
|
* @param lazyInternalNetworkServerPermeateMapping 服务端网络渗透映射领域对象
|
||||||
|
* @return {@link Result<Boolean>} 是否存在 true 存在,false 不存在
|
||||||
|
|
||||||
|
* @author Jia wei Wu
|
||||||
|
* @date 2024/09/17 01:35 下午
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<Boolean> exists(LazyInternalNetworkServerPermeateMapping lazyInternalNetworkServerPermeateMapping) {
|
||||||
|
LazyInternalNetworkServerPermeateMappingDO lazyInternalNetworkServerPermeateMappingDO = LazyInternalNetworkServerPermeateMappingConverter.INSTANCE.fromLazyInternalNetworkServerPermeateMapping(lazyInternalNetworkServerPermeateMapping);
|
||||||
|
Boolean exists=lazyLambdaStream.exists(LazyWrappers.lambdaWrapperBean(lazyInternalNetworkServerPermeateMappingDO));
|
||||||
|
return ResultFactory.successOf(exists);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.mapper.LazyInternalNetworkServerPermeateMappingMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.entity.LazyInternalNetworkServerPermeateMappingDO">
|
||||||
|
<result column="`describe`" property="describe" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="is_deleted" property="isDeleted" />
|
||||||
|
<result column="permeate_target_ip" property="permeateTargetIp" />
|
||||||
|
<result column="permeate_target_port" property="permeateTargetPort" />
|
||||||
|
<result column="server_id" property="serverId" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="visitor_port" property="visitorPort" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user