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