diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/controller/scenario/ApiScenarioReportController.java b/backend/services/api-test/src/main/java/io/metersphere/api/controller/scenario/ApiScenarioReportController.java index 14124a9922..7f97b2cf62 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/controller/scenario/ApiScenarioReportController.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/controller/scenario/ApiScenarioReportController.java @@ -94,9 +94,9 @@ public class ApiScenarioReportController { @Operation(summary = "接口测试-接口报告-报告详情获取") @CheckOwner(resourceId = "#reportId", resourceType = "api_scenario_report") @RequiresPermissions(value = {PermissionConstants.PROJECT_API_REPORT_READ, PermissionConstants.PROJECT_API_SCENARIO_UPDATE}, logical = Logical.OR) - public List getDetail(@PathVariable String stepId, - @PathVariable String reportId) { - return apiScenarioReportService.getDetail(stepId, reportId); + public List getDetail(@PathVariable String reportId, + @PathVariable String stepId) { + return apiScenarioReportService.getDetail(reportId, stepId); } @GetMapping("/get/detail/{shareId}/{reportId}/{stepId}") @@ -105,7 +105,7 @@ public class ApiScenarioReportController { @PathVariable String stepId) { ShareInfo shareInfo = apiReportShareService.checkResource(shareId); apiReportShareService.validateExpired(shareInfo); - return apiScenarioReportService.getDetail(stepId, reportId); + return apiScenarioReportService.getDetail(reportId, stepId); } } diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioReportService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioReportService.java index 00759b271e..96a92f25d7 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioReportService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioReportService.java @@ -245,7 +245,7 @@ public class ApiScenarioReportService { } } - public List getDetail(String stepId, String reportId) { + public List getDetail(String reportId, String stepId) { List apiReportDetails = checkResourceStep(stepId, reportId); List results = new ArrayList<>(); apiReportDetails.forEach(apiReportDetail -> {