fix(接口测试): 嵌套复制的步骤执行没有结果

This commit is contained in:
AgAngle 2024-04-10 16:43:55 +08:00 committed by Craftsman
parent 6e35bb6546
commit 1bea7794bf
1 changed files with 4 additions and 4 deletions

View File

@ -1863,6 +1863,10 @@ public class ApiScenarioService extends MoveNodeService {
private List<String> getHasDetailStepIds(List<? extends ApiScenarioStepCommonDTO> steps, Map<String, Object> stepDetailsParam) { private List<String> getHasDetailStepIds(List<? extends ApiScenarioStepCommonDTO> steps, Map<String, Object> stepDetailsParam) {
List<String> needBlobStepIds = new ArrayList<>(); List<String> needBlobStepIds = new ArrayList<>();
for (ApiScenarioStepCommonDTO step : steps) { for (ApiScenarioStepCommonDTO step : steps) {
List<? extends ApiScenarioStepCommonDTO> children = step.getChildren();
if (CollectionUtils.isNotEmpty(children)) {
needBlobStepIds.addAll(getHasDetailStepIds(children, stepDetailsParam));
}
if (BooleanUtils.isFalse(step.getEnable())) { if (BooleanUtils.isFalse(step.getEnable())) {
continue; continue;
} }
@ -1874,10 +1878,6 @@ public class ApiScenarioService extends MoveNodeService {
continue; continue;
} }
needBlobStepIds.add(step.getId()); needBlobStepIds.add(step.getId());
List<? extends ApiScenarioStepCommonDTO> children = step.getChildren();
if (CollectionUtils.isNotEmpty(children)) {
needBlobStepIds.addAll(getHasDetailStepIds(children, stepDetailsParam));
}
} }
return needBlobStepIds; return needBlobStepIds;
} }