fix(接口测试): 接口定义修改接口保存报错提示
--bug=1040628 --user=王旭 【接口测试】github#30794,接口定义,修改接口保存报错的提示不正确 https://www.tapd.cn/55049933/s/1625826
This commit is contained in:
parent
b3034919c1
commit
a1223f4cf5
|
@ -750,8 +750,9 @@ public class ApiDefinitionService {
|
|||
MSException.throwException(Translator.get("api_versions_create"));
|
||||
}
|
||||
criteria.andVersionIdEqualTo(request.getVersionId());
|
||||
if (apiDefinitionMapper.countByExample(example) > 0) {
|
||||
MSException.throwException(Translator.get("api_definition_url_not_repeating") + " :" + Translator.get("api_definition_module") + ":" + request.getModulePath() + " ," + Translator.get("api_definition_name") + " :" + request.getName());
|
||||
List<ApiDefinition> apiDefinitions = apiDefinitionMapper.selectByExample(example);
|
||||
if (CollectionUtils.isNotEmpty(apiDefinitions)) {
|
||||
MSException.throwException(Translator.get("api_definition_url_not_repeating") + " :" + Translator.get("api_definition_module") + ":" + apiDefinitions.get(0).getModulePath() + " ," + Translator.get("api_definition_name") + " :" + apiDefinitions.get(0).getName());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue