From cc541f8859253d554a70e971dd4a3d2551b23e11 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 23 Mar 2021 18:33:07 +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=E5=A4=B1=E8=B4=A5=E7=94=A8=E4=BE=8B=E6=9C=AA?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtApiDefinitionExecResultMapper.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml index 95189a5806..22a84abd24 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml @@ -36,9 +36,12 @@ SELECT * FROM ( SELECT testCase.testCaseID,testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType FROM ( - SELECT apiCase.id AS testCaseID,apiCase.`name` AS testCaseName,group_concat(testPlan.`name`) AS testPlanName FROM api_test_case apiCase + SELECT apiCase.id AS testCaseID,apiCase.`name` AS testCaseName,group_concat(testPlan.`name`) AS testPlanName, testPlanCase.update_time as updateTime + FROM api_test_case apiCase + inner join api_definition on api_definition.id = apiCase.api_definition_id INNER JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id INNER JOIN test_plan testPlan ON testPlan.id = testPlanCase.test_plan_id + and api_definition.status != 'Trash' GROUP BY apiCase.id ORDER BY apiCase.create_time DESC )testCase @@ -48,7 +51,7 @@ SELECT id FROM api_test_case WHERE project_id = #{projectId} ) and `status` = 'error' GROUP BY resource_id ) caseErrorCountData ON caseErrorCountData.testCaseID =testCase.testCaseID - WHERE caseErrorCountData.executeTime >= #{startTimestamp} + WHERE testCase.updateTime >= #{startTimestamp} UNION SELECT scene.id AS testCaseID,scene.`name` AS caseName,apiScene.testPlanName AS testPlan,count(report.id) AS failureTimes,'scenario' AS caseType FROM api_scenario_report report