fix(接口测试): ql协议-接口参数运行环境下拉无数据

--bug=1011637
--user=郭雨琦
【接口测试】sql协议-api-test-运行环境下拉无数据
This commit is contained in:
guoyuqi 2022-03-23 19:40:53 +08:00 committed by CountryBuilder
parent 35da82ee6b
commit b5e430405e
1 changed files with 3 additions and 0 deletions

View File

@ -121,6 +121,9 @@ public class MsDefinitionParser extends MsAbstractParser<ApiDefinitionImport> {
String request = apiDefinition.getRequest();
JSONObject requestObj = JSONObject.parseObject(request);
// requestObj.put("id", id);
if(requestObj.get("projectId")!=null){
requestObj.put("projectId", apiDefinition.getProjectId());
}
apiDefinition.setRequest(JSONObject.toJSONString(requestObj));
apiDefinition.setCreateUser(SessionUtils.getUserId());
apiDefinition.setUserId(SessionUtils.getUserId());