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表对结束日期