diff --git a/backend/src/main/java/io/metersphere/api/controller/APITestController.java b/backend/src/main/java/io/metersphere/api/controller/APITestController.java index d2c5505922..506362d0ec 100644 --- a/backend/src/main/java/io/metersphere/api/controller/APITestController.java +++ b/backend/src/main/java/io/metersphere/api/controller/APITestController.java @@ -45,9 +45,10 @@ public class APITestController { return PageUtils.setPageInfo(page, apiTestService.list(request)); } - @GetMapping("/list/{projectId}") - public List list(@PathVariable String projectId) { - return apiTestService.getApiTestByProjectId(projectId); + /*查询某个api测试状态*/ + @GetMapping("/list/all/{testId}") + public ApiTest list(@PathVariable String testId) { + return apiTestService.getApiTestByProjectId(testId); } @PostMapping(value = "/schedule/update") @@ -89,4 +90,5 @@ public class APITestController { public String run(@RequestBody SaveAPITestRequest request) { return apiTestService.run(request); } + } diff --git a/backend/src/main/java/io/metersphere/api/service/APITestService.java b/backend/src/main/java/io/metersphere/api/service/APITestService.java index 2d7f0dfa57..f9acef1cd7 100644 --- a/backend/src/main/java/io/metersphere/api/service/APITestService.java +++ b/backend/src/main/java/io/metersphere/api/service/APITestService.java @@ -115,8 +115,8 @@ public class APITestService { return apiTest; } - public List getApiTestByProjectId(String projectId) { - return extApiTestMapper.getApiTestByProjectId(projectId); + public ApiTest getApiTestByProjectId(String testId) { + return apiTestMapper.selectByPrimaryKey(testId); } public void delete(String testId) { diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml index bcb23d82fd..4458cdd58d 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml @@ -45,7 +45,7 @@ diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java index a08cca5f97..7a1aa58b2b 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java @@ -12,4 +12,7 @@ public interface ExtTestCaseMapper { List getTestCaseNames(@Param("request") QueryTestCaseRequest request); List list(@Param("request") QueryTestCaseRequest request); + + List listByMethod(@Param("request") QueryTestCaseRequest request); + } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 32aa2cb719..fb38255072 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -53,4 +53,23 @@ + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java index b4cb348f91..3ecbb207c4 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java @@ -16,6 +16,8 @@ public interface ExtTestPlanTestCaseMapper { List list(@Param("request") QueryTestPlanCaseRequest request); + List listByNode(@Param("request") QueryTestPlanCaseRequest request); + List findRelateTestPlanId(@Param("userId") String userId, @Param("workspaceId") String workspaceId); List getRecentTestedTestCase(@Param("request") QueryTestPlanCaseRequest request); diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index cabc50ee96..32c8bfa95b 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -63,6 +63,42 @@ +