parent
4a5348976d
commit
d5e2da7440
|
@ -1233,6 +1233,8 @@ public class ApiAutomationService {
|
|||
checkReferenceCase(scenarioWithBLOBs, apiTestCaseMapper, apiDefinitionMapper);
|
||||
batchMapper.insert(scenarioWithBLOBs);
|
||||
apiScenarioReferenceIdService.saveApiAndScenarioRelation(scenarioWithBLOBs);
|
||||
extApiScenarioMapper.clearLatestVersion(scenarioWithBLOBs.getRefId());
|
||||
extApiScenarioMapper.addLatestVersion(scenarioWithBLOBs.getRefId());
|
||||
} else {
|
||||
//如果存在则修改
|
||||
if (StringUtils.isEmpty(apiTestImportRequest.getUpdateVersionId())) {
|
||||
|
@ -1342,6 +1344,8 @@ public class ApiAutomationService {
|
|||
relationshipEdgeService.initRelationshipEdge(null, scenarioWithBLOBs);
|
||||
}
|
||||
apiScenarioReferenceIdService.saveApiAndScenarioRelation(scenarioWithBLOBs);
|
||||
extApiScenarioMapper.clearLatestVersion(scenarioWithBLOBs.getRefId());
|
||||
extApiScenarioMapper.addLatestVersion(scenarioWithBLOBs.getRefId());
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
@ -830,6 +830,8 @@ public class ApiDefinitionService {
|
|||
apiDefinition.setRequest(requestStr);
|
||||
|
||||
importCase(apiDefinition, apiTestCaseMapper, caseList);
|
||||
extApiDefinitionMapper.clearLatestVersion(apiDefinition.getRefId());
|
||||
extApiDefinitionMapper.addLatestVersion(apiDefinition.getRefId());
|
||||
} else {
|
||||
//不覆盖的接口,如果没有sameRequest则不导入。此时清空mock信息
|
||||
mocks.clear();
|
||||
|
@ -936,6 +938,8 @@ public class ApiDefinitionService {
|
|||
batchMapper.insert(apiDefinition);
|
||||
}
|
||||
importCase(apiDefinition, apiTestCaseMapper, caseList);
|
||||
extApiDefinitionMapper.clearLatestVersion(apiDefinition.getRefId());
|
||||
extApiDefinitionMapper.addLatestVersion(apiDefinition.getRefId());
|
||||
} else { //如果存在则修改
|
||||
if (StringUtils.isEmpty(apiTestImportRequest.getUpdateVersionId())) {
|
||||
apiTestImportRequest.setUpdateVersionId(apiTestImportRequest.getDefaultVersion());
|
||||
|
|
|
@ -763,7 +763,7 @@
|
|||
JOIN project_version
|
||||
ON tmp.project_id = project_version.project_id AND
|
||||
tmp.version_id = project_version.id AND project_version.latest = TRUE
|
||||
WHERE ref_id = #{refId,jdbcType=VARCHAR}
|
||||
WHERE ref_id = #{refId,jdbcType=VARCHAR} and tmp.status != 'Trash'
|
||||
LIMIT 1
|
||||
)
|
||||
UNION ALL
|
||||
|
|
Loading…
Reference in New Issue