From 87a45eebd81ad36852bbe869457794bea8311583 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Sat, 21 May 2022 15:12:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E4=B8=8B?= =?UTF-8?q?=E8=BD=BDzip=E9=83=BD=E6=98=AF=E6=9C=80=E6=96=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=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=1013315 --user=刘瑞斌 【性能测试】github#13720,性能测试一个任务多个报告,历史的报告下载的也是最新的 jmx 执行文件 https://www.tapd.cn/55049933/s/1161694 Closes #13720 --- .../base/domain/LoadTestReportFile.java | 15 + .../domain/LoadTestReportFileExample.java | 400 ++++++++++++++++++ .../base/mapper/LoadTestReportFileMapper.java | 22 + .../base/mapper/LoadTestReportFileMapper.xml | 153 +++++++ .../mapper/ext/ExtLoadTestReportMapper.java | 3 + .../mapper/ext/ExtLoadTestReportMapper.xml | 7 + .../controller/JmeterFileController.java | 10 +- .../metersphere/performance/dto/ZipDTO.java | 11 + .../performance/engine/EngineFactory.java | 18 +- .../service/JmeterFileService.java | 8 +- .../service/PerformanceReportService.java | 4 + .../db/migration/V118__1.20.4__release.sql | 1 + 12 files changed, 635 insertions(+), 17 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/base/domain/LoadTestReportFile.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/LoadTestReportFileExample.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/LoadTestReportFileMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/LoadTestReportFileMapper.xml create mode 100644 backend/src/main/java/io/metersphere/performance/dto/ZipDTO.java create mode 100644 backend/src/main/resources/db/migration/V118__1.20.4__release.sql diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportFile.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportFile.java new file mode 100644 index 0000000000..35ea0bd18a --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportFile.java @@ -0,0 +1,15 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class LoadTestReportFile implements Serializable { + private String reportId; + + private String fileId; + + private Integer sort; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportFileExample.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportFileExample.java new file mode 100644 index 0000000000..8b8de6e5ce --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportFileExample.java @@ -0,0 +1,400 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestReportFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestReportFileExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andFileIdIsNull() { + addCriterion("file_id is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("file_id is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(String value) { + addCriterion("file_id =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(String value) { + addCriterion("file_id <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(String value) { + addCriterion("file_id >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(String value) { + addCriterion("file_id >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(String value) { + addCriterion("file_id <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(String value) { + addCriterion("file_id <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLike(String value) { + addCriterion("file_id like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotLike(String value) { + addCriterion("file_id not like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("file_id in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("file_id not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(String value1, String value2) { + addCriterion("file_id between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(String value1, String value2) { + addCriterion("file_id not between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andSortIsNull() { + addCriterion("sort is null"); + return (Criteria) this; + } + + public Criteria andSortIsNotNull() { + addCriterion("sort is not null"); + return (Criteria) this; + } + + public Criteria andSortEqualTo(Integer value) { + addCriterion("sort =", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotEqualTo(Integer value) { + addCriterion("sort <>", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThan(Integer value) { + addCriterion("sort >", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThanOrEqualTo(Integer value) { + addCriterion("sort >=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThan(Integer value) { + addCriterion("sort <", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThanOrEqualTo(Integer value) { + addCriterion("sort <=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortIn(List values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List values) { + addCriterion("sort not in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortBetween(Integer value1, Integer value2) { + addCriterion("sort between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotBetween(Integer value1, Integer value2) { + addCriterion("sort not between", value1, value2, "sort"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportFileMapper.java b/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportFileMapper.java new file mode 100644 index 0000000000..935b500fe4 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportFileMapper.java @@ -0,0 +1,22 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.LoadTestReportFile; +import io.metersphere.base.domain.LoadTestReportFileExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestReportFileMapper { + long countByExample(LoadTestReportFileExample example); + + int deleteByExample(LoadTestReportFileExample example); + + int insert(LoadTestReportFile record); + + int insertSelective(LoadTestReportFile record); + + List selectByExample(LoadTestReportFileExample example); + + int updateByExampleSelective(@Param("record") LoadTestReportFile record, @Param("example") LoadTestReportFileExample example); + + int updateByExample(@Param("record") LoadTestReportFile record, @Param("example") LoadTestReportFileExample example); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportFileMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportFileMapper.xml new file mode 100644 index 0000000000..6c46c4c20d --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportFileMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + report_id, file_id, sort + + + + delete from load_test_report_file + + + + + + insert into load_test_report_file (report_id, file_id, sort + ) + values (#{reportId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER} + ) + + + insert into load_test_report_file + + + report_id, + + + file_id, + + + sort, + + + + + #{reportId,jdbcType=VARCHAR}, + + + #{fileId,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + + + + update load_test_report_file + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + file_id = #{record.fileId,jdbcType=VARCHAR}, + + + sort = #{record.sort,jdbcType=INTEGER}, + + + + + + + + update load_test_report_file + set report_id = #{record.reportId,jdbcType=VARCHAR}, + file_id = #{record.fileId,jdbcType=VARCHAR}, + sort = #{record.sort,jdbcType=INTEGER} + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.java index 383313300c..e770a93396 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.java @@ -1,5 +1,6 @@ package io.metersphere.base.mapper.ext; +import io.metersphere.base.domain.FileMetadata; import io.metersphere.base.domain.LoadTestReport; import io.metersphere.base.domain.LoadTestReportWithBLOBs; import io.metersphere.dto.DashboardTestDTO; @@ -27,4 +28,6 @@ public interface ExtLoadTestReportMapper { List selectForPlanReport(@Param("ids") List reportIds); int updateReportVumStatus(String reportId,String reportKey ,String nextStatus, String preStatus); + + List getFileMetadataById(@Param("reportId") String reportId); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.xml index 9c4315e204..643fddfdc5 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.xml @@ -194,4 +194,11 @@ and report_value = #{preStatus,jdbcType=VARCHAR} + diff --git a/backend/src/main/java/io/metersphere/performance/controller/JmeterFileController.java b/backend/src/main/java/io/metersphere/performance/controller/JmeterFileController.java index ed688059d3..65c1ac0c03 100644 --- a/backend/src/main/java/io/metersphere/performance/controller/JmeterFileController.java +++ b/backend/src/main/java/io/metersphere/performance/controller/JmeterFileController.java @@ -3,6 +3,7 @@ package io.metersphere.performance.controller; import io.metersphere.commons.utils.WeakConcurrentHashMap; import io.metersphere.controller.handler.annotation.NoResultHolder; +import io.metersphere.performance.dto.ZipDTO; import io.metersphere.performance.service.JmeterFileService; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; @@ -44,16 +45,15 @@ public class JmeterFileController { } @GetMapping("download") - public ResponseEntity downloadJmeterFiles(@RequestParam("testId") String testId, - @RequestParam("ratio") String ratio, + public ResponseEntity downloadJmeterFiles(@RequestParam("ratio") String ratio, @RequestParam("reportId") String reportId, @RequestParam("resourceIndex") int resourceIndex) { double[] ratios = Arrays.stream(ratio.split(",")).mapToDouble(Double::parseDouble).toArray(); - byte[] bytes = jmeterFileService.downloadZip(reportId, ratios, resourceIndex); + ZipDTO zipDTO = jmeterFileService.downloadZip(reportId, ratios, resourceIndex); return ResponseEntity.ok() .contentType(MediaType.parseMediaType("application/octet-stream")) - .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + testId + ".zip\"") - .body(bytes); + .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + zipDTO.getTestId() + ".zip\"") + .body(zipDTO.getContent()); } } diff --git a/backend/src/main/java/io/metersphere/performance/dto/ZipDTO.java b/backend/src/main/java/io/metersphere/performance/dto/ZipDTO.java new file mode 100644 index 0000000000..8ab633c5de --- /dev/null +++ b/backend/src/main/java/io/metersphere/performance/dto/ZipDTO.java @@ -0,0 +1,11 @@ +package io.metersphere.performance.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; + +@Data +@AllArgsConstructor +public class ZipDTO { + private String testId; + private byte[] content; +} diff --git a/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java b/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java index 0d532bc04f..001643eff2 100644 --- a/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java +++ b/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java @@ -16,7 +16,7 @@ import io.metersphere.i18n.Translator; import io.metersphere.performance.engine.docker.DockerTestEngine; import io.metersphere.performance.parse.EngineSourceParser; import io.metersphere.performance.parse.EngineSourceParserFactory; -import io.metersphere.performance.service.PerformanceTestService; +import io.metersphere.performance.service.PerformanceReportService; import io.metersphere.service.FileService; import io.metersphere.service.KubernetesTestEngine; import io.metersphere.service.TestResourcePoolService; @@ -40,7 +40,7 @@ import java.util.stream.Collectors; @Transactional(rollbackFor = Exception.class) public class EngineFactory { private static FileService fileService; - private static PerformanceTestService performanceTestService; + private static PerformanceReportService performanceReportService; private static TestResourcePoolService testResourcePoolService; public static Class getKubernetesTestEngineClass() { @@ -94,10 +94,10 @@ public class EngineFactory { return null; } - public static EngineContext createContext(LoadTestReportWithBLOBs loadTestReport, double[] ratios, String reportId, int resourceIndex) { - final List fileMetadataList = performanceTestService.getFileMetadataByTestId(loadTestReport.getTestId()); - if (org.springframework.util.CollectionUtils.isEmpty(fileMetadataList)) { - MSException.throwException(Translator.get("run_load_test_file_not_found") + loadTestReport.getTestId()); + public static EngineContext createContext(LoadTestReportWithBLOBs loadTestReport, double[] ratios, int resourceIndex) { + final List fileMetadataList = performanceReportService.getFileMetadataByReportId(loadTestReport.getId()); + if (CollectionUtils.isEmpty(fileMetadataList)) { + MSException.throwException(Translator.get("run_load_test_file_not_found") + loadTestReport.getId()); } // 报告页面点击下载执行zip boolean isLocal = false; @@ -116,7 +116,7 @@ public class EngineFactory { engineContext.setNamespace(loadTestReport.getProjectId()); engineContext.setFileType(FileType.JMX.name()); engineContext.setResourcePoolId(loadTestReport.getTestResourcePoolId()); - engineContext.setReportId(reportId); + engineContext.setReportId(loadTestReport.getId()); engineContext.setResourceIndex(resourceIndex); engineContext.setRatios(ratios); @@ -379,7 +379,7 @@ public class EngineFactory { } @Resource - public void setPerformanceTestService(PerformanceTestService performanceTestService) { - EngineFactory.performanceTestService = performanceTestService; + public void setPerformanceReportService(PerformanceReportService performanceReportService) { + EngineFactory.performanceReportService = performanceReportService; } } diff --git a/backend/src/main/java/io/metersphere/performance/service/JmeterFileService.java b/backend/src/main/java/io/metersphere/performance/service/JmeterFileService.java index c2f2fbc68d..d32adaafb9 100644 --- a/backend/src/main/java/io/metersphere/performance/service/JmeterFileService.java +++ b/backend/src/main/java/io/metersphere/performance/service/JmeterFileService.java @@ -6,6 +6,7 @@ import io.metersphere.base.mapper.LoadTestReportMapper; import io.metersphere.base.mapper.ext.ExtLoadTestReportMapper; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.LogUtil; +import io.metersphere.performance.dto.ZipDTO; import io.metersphere.performance.engine.EngineContext; import io.metersphere.performance.engine.EngineFactory; import org.springframework.stereotype.Service; @@ -28,7 +29,7 @@ public class JmeterFileService { @Resource private LoadTestReportMapper loadTestReportMapper; - public byte[] downloadZip(String reportId, double[] ratios, int resourceIndex) { + public ZipDTO downloadZip(String reportId, double[] ratios, int resourceIndex) { try { LoadTestReportWithBLOBs loadTestReport = loadTestReportMapper.selectByPrimaryKey(reportId); int wait = 0; @@ -43,8 +44,9 @@ public class JmeterFileService { if (loadTestReport == null) { MSException.throwException("测试报告不存在或还没产生"); } - EngineContext context = EngineFactory.createContext(loadTestReport, ratios, reportId, resourceIndex); - return zipFilesToByteArray(context); + EngineContext context = EngineFactory.createContext(loadTestReport, ratios, resourceIndex); + byte[] bytes = zipFilesToByteArray(context); + return new ZipDTO(loadTestReport.getTestId(), bytes); } catch (Exception e) { LogUtil.error(e.getMessage(), e); MSException.throwException(e); 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 5a2ee10c13..f0a834c648 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java @@ -537,4 +537,8 @@ public class PerformanceReportService { request.setIds(ids); deleteReportBatch(request); } + + public List getFileMetadataByReportId(String reportId) { + return extLoadTestReportMapper.getFileMetadataById(reportId); + } } diff --git a/backend/src/main/resources/db/migration/V118__1.20.4__release.sql b/backend/src/main/resources/db/migration/V118__1.20.4__release.sql new file mode 100644 index 0000000000..3a49faa6ce --- /dev/null +++ b/backend/src/main/resources/db/migration/V118__1.20.4__release.sql @@ -0,0 +1 @@ +-- 初始化 sql \ No newline at end of file