parent
321350f17a
commit
7e1c31e429
|
@ -932,7 +932,10 @@ public class ApiDefinitionService {
|
||||||
} else {
|
} else {
|
||||||
apiDefinition.setVersionId(apiTestImportRequest.getDefaultVersion());
|
apiDefinition.setVersionId(apiTestImportRequest.getDefaultVersion());
|
||||||
}
|
}
|
||||||
caseList = setRequestAndAddNewCase(apiDefinition, caseList, true);
|
|
||||||
|
boolean newCreate = !StringUtils.equals(ApiImportPlatform.Swagger2.name(), apiDefinitionImportParamDTO.getApiTestImportRequest().getPlatform())
|
||||||
|
&& !StringUtils.isNotBlank(apiDefinitionImportParamDTO.getApiTestImportRequest().getSwaggerUrl());
|
||||||
|
caseList = setRequestAndAddNewCase(apiDefinition, caseList, newCreate);
|
||||||
reSetImportMocksApiId(mocks, originId, apiDefinition.getId(), apiDefinition.getNum());
|
reSetImportMocksApiId(mocks, originId, apiDefinition.getId(), apiDefinition.getNum());
|
||||||
batchMapper.insert(apiDefinition);
|
batchMapper.insert(apiDefinition);
|
||||||
List<ApiTestCaseDTO> apiTestCaseDTOS = importCase(apiDefinition, apiTestCaseMapper, caseList);
|
List<ApiTestCaseDTO> apiTestCaseDTOS = importCase(apiDefinition, apiTestCaseMapper, caseList);
|
||||||
|
@ -1067,7 +1070,9 @@ public class ApiDefinitionService {
|
||||||
}
|
}
|
||||||
|
|
||||||
reSetImportMocksApiId(mocks, originId, apiDefinition.getId(), apiDefinition.getNum());
|
reSetImportMocksApiId(mocks, originId, apiDefinition.getId(), apiDefinition.getNum());
|
||||||
caseList = setRequestAndAddNewCase(apiDefinition, caseList, true);
|
boolean newCreate = !StringUtils.equals(ApiImportPlatform.Swagger2.name(), apiDefinitionImportParamDTO.getApiTestImportRequest().getPlatform())
|
||||||
|
&& !StringUtils.isNotBlank(apiDefinitionImportParamDTO.getApiTestImportRequest().getSwaggerUrl());
|
||||||
|
caseList = setRequestAndAddNewCase(apiDefinition, caseList, newCreate);
|
||||||
batchMapper.insert(apiDefinition);
|
batchMapper.insert(apiDefinition);
|
||||||
ApiDefinitionResult apiDefinitionResult = getApiDefinitionResult(apiDefinition, false);
|
ApiDefinitionResult apiDefinitionResult = getApiDefinitionResult(apiDefinition, false);
|
||||||
apiImportSendNoticeDTO.setApiDefinitionResult(apiDefinitionResult);
|
apiImportSendNoticeDTO.setApiDefinitionResult(apiDefinitionResult);
|
||||||
|
|
Loading…
Reference in New Issue