From 60725f475c747e958bda08e64d7b98954b675a1f Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 25 Jul 2022 14:37:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E9=87=8D=E8=B7=91=E6=97=B6=E5=9F=BA=E7=A1=80=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=B2=A1=E6=9C=89=E9=87=8D=E6=96=B0=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1015262 --user=宋天阳 【测试跟踪】接口 测试失败重跑后,测试计划报告的通过率没更新 https://www.tapd.cn/55049933/s/1209613 --- .../base/mapper/ext/ExtTestPlanReportMapper.java | 4 +++- .../base/mapper/ext/ExtTestPlanReportMapper.xml | 7 +++++++ .../metersphere/track/service/TestPlanReportService.java | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportMapper.java index 0f0bde657f..144edc09e5 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportMapper.java @@ -16,10 +16,12 @@ import java.util.Set; * @Description */ public interface ExtTestPlanReportMapper { - List list(@Param("request")QueryTestPlanReportRequest request); + List list(@Param("request") QueryTestPlanReportRequest request); @MapKey("id") Map reportCount(@Param("planIds") Set planIds); + void setApiBaseCountAndPassRateIsNullById(String id); + void updateAllStatus(); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportMapper.xml index f495745585..99db0397a4 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportMapper.xml @@ -154,6 +154,13 @@ GROUP BY t.test_plan_id + + + update test_plan_report_content + SET api_base_count = NULL AND pass_rate = NULL + WHERE id = #{0} + + update test_plan_report set status="COMPLETED" where status in ('Rerunning','Running') diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java index f71d16c0d4..0f072c8ac4 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java @@ -540,6 +540,9 @@ public class TestPlanReportService { List contents = testPlanReportContentMapper.selectByExampleWithBLOBs(contentExample); if (CollectionUtils.isNotEmpty(contents)) { content = contents.get(0); + content.setApiBaseCount(null); + content.setPassRate(null); + extTestPlanReportMapper.setApiBaseCountAndPassRateIsNullById(content.getId()); } if (content != null) { //更新content表对结束日期