🔨 优化会话连接逻辑.

This commit is contained in:
lijiahangmax
2024-12-29 15:14:19 +08:00
parent 6b14c2ef9c
commit 3b89e9bf29
9 changed files with 54 additions and 32 deletions

View File

@@ -36,6 +36,7 @@ import java.util.Map;
* @version 1.0.0
* @since 2023-9-11 14:16
*/
// TODO 待优化
public interface HostConfigService {
/**

View File

@@ -141,6 +141,7 @@ public class ExecCommandServiceImpl implements ExecCommandService {
// 查询主机信息
List<HostDO> hosts = hostDAO.selectBatchIds(hostIdList);
// 查询主机配置
// TODO 待优化
Map<Long, HostSshConfigModel> hostConfigMap = hostConfigService.buildHostConfigMap(hosts, HostTypeEnum.SSH);
// 插入日志
ExecLogDO execLog = ExecLogDO.builder()

View File

@@ -388,6 +388,7 @@ public class ExecLogServiceImpl implements ExecLogService {
}
Valid.notEmpty(hostLogs, ErrorMessage.LOG_ABSENT);
// 获取编码集
// TODO 待优化
List<Long> hostIdList = hostLogs.stream()
.map(ExecHostLogDO::getHostId)
.collect(Collectors.toList());