diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java index 195b409e32..6ef928383a 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java @@ -137,7 +137,7 @@ public class TestPlanApiCaseController { @PostMapping("/batch/run") @Operation(summary = "批量执行") @RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE) - @CheckOwner(resourceId = "#request.getId()", resourceType = "test_plan_api_case", relationType = "test_plan") + @CheckOwner(resourceId = "#request.getSelectIds()", resourceType = "test_plan_api_case", relationType = "test_plan") public void batchRun(@Validated @RequestBody TestPlanApiCaseBatchRunRequest request) { testPlanApiCaseBatchRunService.asyncBatchRun(request, SessionUtils.getUserId()); } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java index 3e4a6decee..42a860e0ac 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java @@ -87,7 +87,7 @@ public class TestPlanApiScenarioController { @PostMapping("/batch/run") @Operation(summary = "批量执行") @RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE) - @CheckOwner(resourceId = "#request.getId()", resourceType = "test_plan_api_scenario", relationType = "test_plan") + @CheckOwner(resourceId = "#request.getSelectIds()", resourceType = "test_plan_api_scenario", relationType = "test_plan") public void batchRun(@Validated @RequestBody TestPlanApiScenarioBatchRunRequest request) { testPlanApiScenarioBatchRunService.asyncBatchRun(request, SessionUtils.getUserId()); }