From 1e22a17c44d6e8d079e61a172d1ec608c9537681 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 19 Dec 2023 10:09:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=87=BA=E5=9C=BA=E6=99=AF=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E6=9C=80=E6=96=B0=E6=95=B0=E6=8D=AE=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1033685 --user=王孝刚 【接口测试】github#27976,【接口自动化】当前置脚本里代码被注释掉进行保存,之后导出后再导入,发现注释的内容恢复了。 https://www.tapd.cn/55049933/s/1445112 --- .../metersphere/service/scenario/ApiScenarioService.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java index 220e838675..3fa148dac5 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java @@ -1629,10 +1629,11 @@ public class ApiScenarioService { private List getExportResult(ApiScenarioBatchRequest request) { ServiceUtils.getSelectAllIds(request, request.getCondition(), (query) -> extApiScenarioMapper.selectIdsByQuery(query)); - ApiScenarioExample example = new ApiScenarioExample(); - example.createCriteria().andIdIn(request.getIds()); - List apiScenarioWithBLOBs = apiScenarioMapper.selectByExampleWithBLOBs(example); - return apiScenarioWithBLOBs; + List result = new ArrayList<>(); + request.getIds().forEach( item-> { + result.add(this.getNewApiScenario(item)); + }); + return result; } public ApiScenrioExportResult export(ApiScenarioBatchRequest request) {