From 0f399686dc7cc96e7608eee0cc3059d1b7f72752 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Sun, 23 Apr 2023 17:49:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=98=AF=E5=A4=B1=E8=B4=A5=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1025735 --user=陈建星 【测试跟踪】首页-过去7天测试计划失败用例TOP 10-选择下一页后页面显示错误 https://www.tapd.cn/55049933/s/1365861 --- .../metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml | 2 +- .../base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml | 4 ++-- .../metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml | 4 ++-- .../src/business/home/components/FailureTestCaseList.vue | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml index 806f2acaf3..f430548572 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml @@ -55,7 +55,7 @@ INNER JOIN api_definition on api_definition.id = apiCase.api_definition_id WHERE (apiCase.`status` IS NULL OR apiCase.`status` != 'Trash') - AND apiCase.project_id = #{projectId} + AND testPlan.project_id = #{projectId} ) testCase INNER JOIN (SELECT executionInfo.source_id AS sourceId, COUNT(executionInfo.id) AS dataCountNumber diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml index 2c1cfb5d17..e62caf4f1d 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml @@ -62,10 +62,10 @@ SELECT testPlanScenario.id, testPlanScenario.api_scenario_id, testPlan.id AS testPlanId, testPlan.`name` AS testPlanName FROM test_plan_api_scenario testPlanScenario INNER JOIN test_plan testPlan ON testPlan.id = testPlanScenario.test_plan_id + WHERE testPlan.project_id = #{projectId} ) apiScene ON apiScene.id = executionInfo.source_id INNER JOIN api_scenario scene ON scene.id = apiScene.api_scenario_id - WHERE scene.project_id = #{projectId} - AND scene.`status` != 'Trash' + WHERE scene.`status` != 'Trash' AND ( executionInfo.result = 'ERROR' ) AND executionInfo.create_time >= #{startTimestamp} diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index 3a38229a4f..e34caf6a15 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -689,11 +689,11 @@ FROM test_plan_test_case testPlanTestCase INNER JOIN test_plan testPlan ON testPlan.id = testPlanTestCase.plan_id + WHERE testPlan.project_id = #{projectId} ) testCasePlan ON testCasePlan.id = executionInfo.source_id INNER JOIN test_case testCase ON testCase.id = testCasePlan.case_id WHERE - testCase.project_id = #{projectId} - AND testCase.`status` != 'Trash' + testCase.`status` != 'Trash' AND ( executionInfo.result = 'Failure' ) AND executionInfo.create_time >= #{startTimestamp} GROUP BY testCase.id diff --git a/test-track/frontend/src/business/home/components/FailureTestCaseList.vue b/test-track/frontend/src/business/home/components/FailureTestCaseList.vue index a009cf4e68..4ddf5be380 100644 --- a/test-track/frontend/src/business/home/components/FailureTestCaseList.vue +++ b/test-track/frontend/src/business/home/components/FailureTestCaseList.vue @@ -183,7 +183,7 @@ export default { .then((r) => { this.loading = false; this.loadError = false; - this.total = 10; + this.total = r.data.itemCount; this.tableData = r.data.listObject; }) .catch(() => {