From 835f459565e9a5ee297d5d138b467e95f4693ce0 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 22 Nov 2021 13:55:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=E7=BC=BA=E5=B0=91sql=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ext/ExtApiDefinitionExecResultMapper.java | 7 +++++-- .../ext/ExtApiDefinitionExecResultMapper.xml | 19 +++++++++++++++++-- .../ext/ExtApiScenarioReportMapper.java | 2 ++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java index fa3d030d85..eb19dbb3bb 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java @@ -22,9 +22,12 @@ public interface ExtApiDefinitionExecResultMapper { List findFaliureCaseInfoByProjectIDAndExecuteTimeAndLimitNumber(@Param("projectId") String projectId, @Param("startTimestamp") long startTimestamp); - String selectExecResult(String resourceId); + String selectExecResult(String resourceId); ApiDefinitionExecResult selectPlanApiMaxResultByTestIdAndType(String resourceId, String type); - List selectStatusByIdList(@Param("ids")Collection values); + List selectStatusByIdList(@Param("ids") Collection values); + + List selectApiResultByProjectId(String projectId); + } \ No newline at end of file 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 8abf019d6d..4656d8e493 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 @@ -2,7 +2,8 @@ - delete from api_definition_exec_result where resource_id = #{id,jdbcType=VARCHAR} + delete + from api_definition_exec_result where resource_id = #{id,jdbcType=VARCHAR} - select id,status from api_definition_exec_result + select id,status from api_definition_exec_result where id in #{v} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioReportMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioReportMapper.java index 8dcca9fa9b..f0f0624d0a 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioReportMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioReportMapper.java @@ -32,4 +32,6 @@ public interface ExtApiScenarioReportMapper { List countByApiScenarioId(); List selectStatusByIds(@Param("ids") Collection values); + + List selectReportByProjectId(String projectId); } \ No newline at end of file