From fbdf3b1be3a034efdf5e796035abdd36c971c40b Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Mon, 1 Apr 2024 20:12:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=9A=84=E7=94=A8=E4=BE=8B=E5=92=8C=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=EF=BC=8C=E6=B2=A1=E6=9C=89=E4=BF=9D=E5=AD=98=EF=BC=8C?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/service/scenario/ApiScenarioService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 5139efe01b..f90ea029be 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 @@ -1240,6 +1240,9 @@ public class ApiScenarioService extends MoveNodeService { msScenario.setScenarioConfig(getScenarioConfig(request, hasSave)); msScenario.setProjectId(request.getProjectId()); + // 处理特殊的步骤详情 + addSpecialStepDetails(request.getSteps(), request.getStepDetails()); + ApiScenarioParseTmpParam tmpParam = parse(msScenario, request.getSteps(), request); ApiResourceRunRequest runRequest = getApiResourceRunRequest(msScenario, tmpParam); @@ -1750,7 +1753,7 @@ public class ApiScenarioService extends MoveNodeService { .collect(Collectors.toMap(ApiScenarioStepBlob::getId, blob -> new String(blob.getContent()))); // 前端有传,就用前端传的 if (stepDetailsParam != null) { - stepDetailsParam.forEach((stepId, detail) -> stepDetails.put(stepId, JSON.toJSONString(detail))); + stepDetailsParam.forEach((stepId, detail) -> stepDetails.put(stepId, detail instanceof byte[] bytes ? new String(bytes) : JSON.toJSONString(detail))); } return stepDetails; }