fix(接口测试): 解决多版本创建问题

此次解决将多版本逻辑场景名称不能相同改为可以相同
修复由此问题报错导致页面一直loading问题
--user=郭雨琦
This commit is contained in:
guoyuqi 2022-10-21 18:32:09 +08:00 committed by jianxing
parent 89aeda307c
commit b360a0f84d
1 changed files with 0 additions and 13 deletions

View File

@ -719,19 +719,6 @@ public class ApiAutomationService {
if (apiScenarioMapper.countByExample(example) > 0) { if (apiScenarioMapper.countByExample(example) > 0) {
MSException.throwException(Translator.get("automation_name_already_exists") + " :" + Translator.get("api_definition_module") + request.getModulePath() + " ," + Translator.get("automation_name") + " :" + request.getName()); MSException.throwException(Translator.get("automation_name_already_exists") + " :" + Translator.get("api_definition_module") + request.getModulePath() + " ," + Translator.get("automation_name") + " :" + request.getName());
} }
if (StringUtils.isNotBlank(request.getId())) {
ApiScenarioWithBLOBs scenario = apiScenarioMapper.selectByPrimaryKey(request.getId());
if (scenario != null) {
example = new ApiScenarioExample();
example.createCriteria().andRefIdEqualTo(scenario.getRefId()).andStatusNotEqualTo("Trash");
List<ApiScenario> apiScenarios = apiScenarioMapper.selectByExample(example);
if (apiScenarios != null && apiScenarios.size() > 1) {
if (!StringUtils.equals(scenario.getName(), request.getName())) {
MSException.throwException(Translator.get("automation_versions_update"));
}
}
}
}
} }
public ApiScenarioDTO getNewApiScenario(String id) { public ApiScenarioDTO getNewApiScenario(String id) {