机器管理规范化
This commit is contained in:
parent
6b8165028e
commit
38ba61ed3a
@ -80,7 +80,7 @@ public class MachineInfoController {
|
||||
|
||||
@PostMapping("/test")
|
||||
@Operation(summary = "测试机器连接")
|
||||
public CommonResult<Boolean> testConnection(@RequestParam Long id) {
|
||||
public CommonResult<Boolean> testConnection(@RequestParam("id") Long id) {
|
||||
return success(machineInfoService.testConnection(id));
|
||||
}
|
||||
|
||||
@ -102,13 +102,13 @@ public class MachineInfoController {
|
||||
return success(machineInfoService.connect(machineInfoDO));
|
||||
}
|
||||
|
||||
@PostMapping("/disconnect/{sessionId}")
|
||||
@GetMapping("/disconnect/{sessionId}")
|
||||
@Operation(summary = "断开机器连接")
|
||||
public CommonResult<Boolean> disconnect(@PathVariable String sessionId) {
|
||||
return success(machineInfoService.disconnect(sessionId));
|
||||
}
|
||||
|
||||
@PostMapping("/execute/{sessionId}")
|
||||
@GetMapping("/execute/{sessionId}")
|
||||
@Operation(summary = "执行远程命令")
|
||||
public CommonResult<String> executeCommand(
|
||||
@PathVariable String sessionId,
|
||||
@ -117,7 +117,7 @@ public class MachineInfoController {
|
||||
return success(machineInfoService.executeCommand(sessionId, command));
|
||||
}
|
||||
|
||||
@PostMapping("/upload/{sessionId}")
|
||||
@GetMapping("/upload/{sessionId}")
|
||||
@Operation(summary = "上传文件到远程机器")
|
||||
public CommonResult<Boolean> uploadFile(
|
||||
@PathVariable String sessionId,
|
||||
@ -126,7 +126,7 @@ public class MachineInfoController {
|
||||
return success(machineInfoService.uploadFile(sessionId, localFilePath, remoteFilePath));
|
||||
}
|
||||
|
||||
@PostMapping("/download/{sessionId}")
|
||||
@GetMapping("/download/{sessionId}")
|
||||
@Operation(summary = "从远程机器下载文件")
|
||||
public CommonResult<Boolean> downloadFile(
|
||||
@PathVariable String sessionId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user