diff --git a/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java b/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java index 33c98fd2e3..174c8dfd48 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java @@ -59,6 +59,8 @@ public class PerformanceReportService { @Resource private LoadTestReportResultMapper loadTestReportResultMapper; @Resource + private LoadTestReportResultPartMapper loadTestReportResultPartMapper; + @Resource private LoadTestReportLogMapper loadTestReportLogMapper; @Resource private TestResourceService testResourceService; @@ -123,6 +125,11 @@ public class PerformanceReportService { loadTestReportResultExample.createCriteria().andReportIdEqualTo(reportId); loadTestReportResultMapper.deleteByExample(loadTestReportResultExample); + // delete load_test_report_result + LoadTestReportResultPartExample loadTestReportResultPartExample = new LoadTestReportResultPartExample(); + loadTestReportResultPartExample.createCriteria().andReportIdEqualTo(reportId); + loadTestReportResultPartMapper.deleteByExample(loadTestReportResultPartExample); + // delete load_test_report_detail LoadTestReportDetailExample example = new LoadTestReportDetailExample(); example.createCriteria().andReportIdEqualTo(reportId);