mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-30 02:58:31 +08:00
refactor(通用功能): 版本置新最新版本不允许设置最新版本
--bug=1020898 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001020898
This commit is contained in:
parent
af50472fa9
commit
559b3140bf
@ -782,7 +782,10 @@ public class ApiDefinitionService {
|
||||
apiTestCaseService.updateByApiDefinitionId(ids, test, request.getTriggerUpdate());
|
||||
}
|
||||
ApiDefinitionWithBLOBs result = apiDefinitionMapper.selectByPrimaryKey(test.getId());
|
||||
//checkAndSetLatestVersion(result.getRefId());
|
||||
String defaultVersion = baseProjectVersionMapper.getDefaultVersion(request.getProjectId());
|
||||
if (StringUtils.equalsIgnoreCase(request.getVersionId(), defaultVersion)) {
|
||||
checkAndSetLatestVersion(result.getRefId());
|
||||
}
|
||||
|
||||
// 存储附件关系
|
||||
extFileAssociationService.saveApi(test.getId(), request.getRequest(), FileAssociationTypeEnums.API.name());
|
||||
|
@ -409,7 +409,10 @@ public class ApiScenarioService {
|
||||
if (relationshipEdgeService != null) {
|
||||
relationshipEdgeService.initRelationshipEdge(beforeScenario, scenario);
|
||||
}
|
||||
//checkAndSetLatestVersion(beforeScenario.getRefId());
|
||||
String defaultVersion = baseProjectVersionMapper.getDefaultVersion(request.getProjectId());
|
||||
if (StringUtils.equalsIgnoreCase(request.getVersionId(), defaultVersion)) {
|
||||
checkAndSetLatestVersion(beforeScenario.getRefId());
|
||||
}
|
||||
// 存储附件关系
|
||||
extFileAssociationService.saveScenario(scenario.getId(), request.getScenarioDefinition());
|
||||
return scenario;
|
||||
|
@ -325,7 +325,10 @@ public class PerformanceTestService {
|
||||
copyLoadTestFiles(testId, loadTest.getId());
|
||||
loadTestMapper.insertSelective(loadTest);
|
||||
}
|
||||
//checkAndSetLatestVersion(loadTest.getRefId());
|
||||
String defaultVersion = baseProjectVersionMapper.getDefaultVersion(request.getProjectId());
|
||||
if (StringUtils.equalsIgnoreCase(request.getVersionId(), defaultVersion)) {
|
||||
checkAndSetLatestVersion(loadTest.getRefId());
|
||||
}
|
||||
return loadTest;
|
||||
}
|
||||
|
||||
|
@ -463,7 +463,11 @@ public class TestCaseService {
|
||||
dealWithOtherInfoOfNewVersion(testCase, oldTestCase.getId());
|
||||
testCaseMapper.insertSelective(testCase);
|
||||
}
|
||||
//checkAndSetLatestVersion(testCase.getRefId());
|
||||
String defaultVersion = baseProjectVersionMapper.getDefaultVersion(testCase.getProjectId());
|
||||
if (StringUtils.equalsIgnoreCase(testCase.getVersionId(), defaultVersion)) {
|
||||
checkAndSetLatestVersion(testCase.getRefId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user