From 255a15a8255dd6beb9309b95c2ba3a4b27433734 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 24 Jun 2024 18:08:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E6=98=8E=E7=BB=86=E4=B8=8D=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1042969 --user=宋昌昌 【测试计划】独立报告-接口用例明细-点击未执行用例ID-提示当前用户没有操作此资源的权限 https://www.tapd.cn/55049933/s/1535526 --- .../java/io/metersphere/plan/dto/ReportDetailCasePageDTO.java | 2 ++ .../plan/mapper/ExtTestPlanReportApiCaseMapper.xml | 4 ++-- .../plan/mapper/ExtTestPlanReportApiScenarioMapper.xml | 4 ++-- .../plan/mapper/ExtTestPlanReportFunctionalCaseMapper.xml | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/ReportDetailCasePageDTO.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/ReportDetailCasePageDTO.java index 204c66161e..14c41b9fcd 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/ReportDetailCasePageDTO.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/ReportDetailCasePageDTO.java @@ -28,4 +28,6 @@ public class ReportDetailCasePageDTO { private Long bugCount; @Schema(description = "报告详情ID") private String reportId; + @Schema(description = "项目ID") + private String projectId; } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml index 702400f8a3..8cddfbbd95 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml @@ -28,8 +28,8 @@ select tprac.api_case_id as id, tprac.api_case_num as num, tprac.api_case_name as name, tprac.api_case_module as moduleName, tprac.api_case_priority as priority, tprac.api_case_execute_report_id reportId, - ifnull(tprac.api_case_execute_result, 'PENDING') as executeResult, tprac.api_case_execute_user as executeUser, 0 as bugCount - from test_plan_report_api_case tprac + ifnull(tprac.api_case_execute_result, 'PENDING') as executeResult, tprac.api_case_execute_user as executeUser, 0 as bugCount, atc.project_id projectId + from test_plan_report_api_case tprac left join api_test_case atc on tprac.api_case_id = atc.id where tprac.test_plan_report_id = #{request.reportId} diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiScenarioMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiScenarioMapper.xml index 540f57eed7..deb3e73f64 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiScenarioMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiScenarioMapper.xml @@ -27,8 +27,8 @@ select distinct tpras.api_scenario_id as id, tpras.api_scenario_num as num, tpras.api_scenario_name as name, tpras.api_scenario_module as moduleName, tpras.api_scenario_priority as priority, tpras.api_scenario_execute_report_id reportId, - ifnull(tpras.api_scenario_execute_result, 'PENDING') as executeResult, tpras.api_scenario_execute_user as executeUser, 0 as bugCount - from test_plan_report_api_scenario tpras + ifnull(tpras.api_scenario_execute_result, 'PENDING') as executeResult, tpras.api_scenario_execute_user as executeUser, 0 as bugCount, aso.project_id projectId + from test_plan_report_api_scenario tpras left join api_scenario aso on tpras.api_scenario_id = aso.id where tpras.test_plan_report_id = #{request.reportId} diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportFunctionalCaseMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportFunctionalCaseMapper.xml index e21589fb48..d66ec46fdf 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportFunctionalCaseMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportFunctionalCaseMapper.xml @@ -48,8 +48,9 @@ select tprfc.function_case_id as id, tprfc.function_case_num as num, tprfc.function_case_name as name, tprfc.function_case_module as moduleName, tprfc.function_case_priority as priority, ifnull(tprfc.function_case_execute_result, 'PENDING') as executeResult, tprfc.function_case_execute_user as executeUser, - ifnull(tprfc.function_case_bug_count, 0) as bugCount, tprfc.function_case_execute_report_id reportId + ifnull(tprfc.function_case_bug_count, 0) as bugCount, tprfc.function_case_execute_report_id reportId, fc.project_id projectId from test_plan_report_function_case tprfc + left join functional_case fc on fc.id = tprfc.function_case_id where tprfc.test_plan_report_id = #{request.reportId}