diff --git a/backend/src/main/java/io/metersphere/controller/TestPlanController.java b/backend/src/main/java/io/metersphere/controller/TestPlanController.java index b8b639f7eb..98efe3242d 100644 --- a/backend/src/main/java/io/metersphere/controller/TestPlanController.java +++ b/backend/src/main/java/io/metersphere/controller/TestPlanController.java @@ -1,6 +1,7 @@ package io.metersphere.controller; -import io.metersphere.requests.testplan.FileOperationRequest; +import io.metersphere.controller.request.testplan.FileOperationRequest; +import io.metersphere.controller.request.testplan.SaveTestPlanRequest; import io.metersphere.service.FileService; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; @@ -21,6 +22,11 @@ public class TestPlanController { @Resource private FileService fileService; + @PostMapping("/save") + public void save(@RequestBody SaveTestPlanRequest request) { + System.out.println(String.format("save test plan: %s", request.getName())); + } + @PostMapping("/file/upload") public void uploadJmx(MultipartFile file) throws IOException { fileService.upload(file.getOriginalFilename(), file); diff --git a/backend/src/main/java/io/metersphere/requests/testplan/FileOperationRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java similarity index 78% rename from backend/src/main/java/io/metersphere/requests/testplan/FileOperationRequest.java rename to backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java index 88ff096c6a..98e8c0ae5b 100644 --- a/backend/src/main/java/io/metersphere/requests/testplan/FileOperationRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java @@ -1,4 +1,4 @@ -package io.metersphere.requests.testplan; +package io.metersphere.controller.request.testplan; public class FileOperationRequest { private String name; diff --git a/backend/src/main/java/io/metersphere/controller/request/testplan/SaveTestPlanRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplan/SaveTestPlanRequest.java new file mode 100644 index 0000000000..48b3a3b206 --- /dev/null +++ b/backend/src/main/java/io/metersphere/controller/request/testplan/SaveTestPlanRequest.java @@ -0,0 +1,31 @@ +package io.metersphere.controller.request.testplan; + +public class SaveTestPlanRequest { + private String fileId; + private String project; + private String name; + + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + public String getProject() { + return project; + } + + public void setProject(String project) { + this.project = project; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/frontend/src/performance/components/testPlan/CreateTestPlan.vue b/frontend/src/performance/components/testPlan/CreateTestPlan.vue index 2a1cd96af5..4e35e56120 100644 --- a/frontend/src/performance/components/testPlan/CreateTestPlan.vue +++ b/frontend/src/performance/components/testPlan/CreateTestPlan.vue @@ -2,8 +2,8 @@