fix(接口定义): 修复场景下的case没有显示运行ip的缺陷

--bug=1017876 --user=王孝刚 【接口测试】接口自动化中存在运行环境的场景下的接口没有显示运行环境的ip
https://www.tapd.cn/55049933/s/1260378
This commit is contained in:
wxg0103 2022-10-13 11:47:10 +08:00 committed by f2c-ci-robot[bot]
parent ad33d5932d
commit 3325519075
2 changed files with 4 additions and 4 deletions

View File

@ -2131,7 +2131,7 @@ public class ApiDefinitionService {
if (request.getAuthManager() != null && StringUtils.isNotBlank(request.getAuthManager().getUsername()) && StringUtils.isNotBlank(request.getAuthManager().getPassword())) {
configObj.put("authManager", request.getAuthManager());
}
return JSON.toJSONString(configObj);
return configObj.toString();
}
/**
@ -2325,7 +2325,7 @@ public class ApiDefinitionService {
map.put(PropertyConstant.TYPE, "ESB");
}
request.remove("backEsbDataStruct");
bloBs.setRequest(JSON.toJSONString(request));
bloBs.setRequest(request.toString());
String response = JSON.toJSONString(map);
bloBs.setResponse(response);
}

View File

@ -796,7 +796,7 @@ public class ApiScenarioService {
if (config.getConfig() != null && !config.getConfig().isEmpty()) {
ElementUtil.dataSetDomain(element.getJSONArray(ElementConstants.HASH_TREE), config);
}
return JSON.toJSONString(element);
return element.toString();
} catch (Exception e) {
return scenarioDefinition;
}
@ -1160,7 +1160,7 @@ public class ApiScenarioService {
JSONObject object = JSONUtil.parseObject(item.getScenarioDefinition());
object.put("environmentId", request.getEnvironmentId());
if (object != null) {
item.setScenarioDefinition(JSON.toJSONString(object));
item.setScenarioDefinition(object.toString());
}
apiScenarioMapper.updateByPrimaryKeySelective(item);
apiScenarioReferenceIdService.saveApiAndScenarioRelation(item);