From bff7c3ad7854999ac73187012a1a96ff4e1f54de Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Wed, 18 Dec 2024 14:58:36 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E9=81=BF=E5=85=8D=E5=90=8C=E4=B8=80=E4=B8=AA=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1=E4=B8=AD=E5=A4=9A=E6=AC=A1=E8=B0=83=E7=94=A8=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=9C=BA=E6=99=AF=E8=AF=A6=E6=83=85=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=95=B0=E6=8D=AE=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1050539 --user=陈建星 【测试计划】github#34649,测试计划执行时,有时候步骤会执行多次 https://www.tapd.cn/55049933/s/1633266 --- .../io/metersphere/api/mapper/ExtApiScenarioStepMapper.java | 6 ++++++ .../io/metersphere/api/mapper/ExtApiScenarioStepMapper.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioStepMapper.java b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioStepMapper.java index 9cc50ea09b..ee8107d8c2 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioStepMapper.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioStepMapper.java @@ -13,6 +13,12 @@ import java.util.List; public interface ExtApiScenarioStepMapper { List getStepIdsByScenarioId(@Param("scenarioId") String scenarioId); + /** + * 这个 sql 执行时,会清理一级缓存 + * 避免多次调用后数据异常 + * @param scenarioIds + * @return + */ List getStepDTOByScenarioIds(@Param("scenarioIds") List scenarioIds); List getCsvStepByScenarioIds(@Param("scenarioIds") List scenarioId); diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioStepMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioStepMapper.xml index ce461ad616..41b2c6c85f 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioStepMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioStepMapper.xml @@ -5,7 +5,7 @@ - select from api_scenario_step where scenario_id in