From 3013dcd4ef775c50c3b176108f72b08d0d930086 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Wed, 21 Jul 2021 15:10:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E3=80=81=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E3=80=81=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E7=94=A8=E4=BE=8B):=20=E4=BF=AE=E5=A4=8D=E5=9B=9E?= =?UTF-8?q?=E6=94=B6=E7=AB=99=E9=87=8C=E6=81=A2=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=B8=A6=E4=B8=8A=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=A8=A1=E5=9D=97=E4=BF=A1=E6=81=AF=E7=9A=84?= =?UTF-8?q?Bug=EF=BC=9B=E4=BF=AE=E5=A4=8D=E7=8E=AF=E5=A2=83=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E8=AE=BE=E7=BD=AE=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84?= =?UTF-8?q?Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1005175 --user=宋天阳 【接口自动化】回收站里恢复场景后,没有带上之前的模块信息 https://www.tapd.cn/55049933/s/1027020 --bug=1005202 --user=宋天阳 【接口自动化】环境参数设置不生效 https://www.tapd.cn/55049933/s/1027053 --- .../dto/definition/request/sampler/MsHTTPSamplerProxy.java | 4 +++- .../java/io/metersphere/api/service/ApiAutomationService.java | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java index ce755e41e0..392cba3bc4 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java @@ -253,7 +253,9 @@ public class MsHTTPSamplerProxy extends MsTestElement { if (CollectionUtils.isNotEmpty(hashTree)) { for (MsTestElement el : hashTree) { - el.setEnvironmentId(useEnvironment); + if(this.getEnvironmentId() == null){ + el.setEnvironmentId(useEnvironment); + } el.toHashTree(httpSamplerTree, el.getHashTree(), config); } } diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index ae224bfc32..7cc7885851 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -52,7 +52,6 @@ import io.metersphere.track.service.TestPlanScenarioCaseService; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.ibatis.annotations.Param; import org.apache.ibatis.session.ExecutorType; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory;