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 1536719d06..1a0bf41e0d 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 @@ -1214,6 +1214,7 @@ public class ApiScenarioService extends MoveNodeService { example.createCriteria() .andNameEqualTo(apiScenario.getName()) .andModuleIdEqualTo(apiScenario.getModuleId()) + .andDeletedEqualTo(false) .andProjectIdEqualTo(apiScenario.getProjectId()); if (apiScenarioMapper.countByExample(example) > 0) { throw new MSException(API_SCENARIO_EXIST); @@ -1230,6 +1231,7 @@ public class ApiScenarioService extends MoveNodeService { .andIdNotEqualTo(request.getId()) .andModuleIdEqualTo(request.getModuleId()) .andNameEqualTo(request.getName()) + .andDeletedEqualTo(false) .andProjectIdEqualTo(request.getProjectId()); if (apiScenarioMapper.countByExample(example) > 0) { throw new MSException(API_SCENARIO_EXIST); @@ -1310,6 +1312,9 @@ public class ApiScenarioService extends MoveNodeService { msScenario.setScenarioConfig(getScenarioConfig(request, true)); msScenario.setProjectId(request.getProjectId()); + // 处理特殊的步骤详情 + addSpecialStepDetails(request.getSteps(), request.getStepDetails()); + return executeRun(apiScenario, msScenario, request.getSteps(), request, request.getReportId(), userId); }