From 8244a9a92c98bdf64982656ae55d4fb31a23bcfd Mon Sep 17 00:00:00 2001 From: Jianguo-Genius Date: Mon, 18 Nov 2024 18:39:39 +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=9C=BA=E6=99=AF=E5=AF=BC=E5=87=BA=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E4=B8=BA=E6=AD=A5=E9=AA=A4=E6=8E=92=E5=BA=8F=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/service/scenario/ApiScenarioService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioService.java index 5d9f3b1e66..87fe8d8581 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioService.java @@ -7,7 +7,6 @@ import io.metersphere.api.controller.result.ApiResultCode; import io.metersphere.api.domain.*; import io.metersphere.api.dto.*; import io.metersphere.api.dto.debug.ApiFileResourceUpdateRequest; -import io.metersphere.api.dto.definition.ExecHistoryDTO; import io.metersphere.api.dto.definition.ExecutePageRequest; import io.metersphere.api.dto.definition.ExecuteReportDTO; import io.metersphere.api.dto.export.MetersphereApiScenarioExportResponse; @@ -86,7 +85,6 @@ import org.mybatis.spring.SqlSessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.atomic.AtomicLong; import java.util.function.BiConsumer; @@ -1871,7 +1869,7 @@ public class ApiScenarioService extends MoveNodeService { refScenarioSteps = childStep.stream().filter(k -> isScenarioStep(k.getStepType())).toList(); } // 嵌套获取引用的场景步骤 - return returnList; + return returnList.stream().sorted(Comparator.comparing(ApiScenarioStepDTO::getSort)).collect(Collectors.toList()); } private List getStepDTOByScenarioIds(List scenarioIds) {