'接口测试名称重复国际化修改'
This commit is contained in:
parent
7849e771e5
commit
0639330f83
|
@ -130,10 +130,22 @@ public class APITestService {
|
|||
test.setScenarioDefinition(request.getScenarioDefinition());
|
||||
test.setUpdateTime(System.currentTimeMillis());
|
||||
test.setStatus(APITestStatus.Saved.name());
|
||||
/*checkApiTestPlanExist(test);*/
|
||||
checkApiTestExist(test);
|
||||
apiTestMapper.updateByPrimaryKeySelective(test);
|
||||
return test;
|
||||
}
|
||||
|
||||
private void checkApiTestExist(ApiTest apiTest) {
|
||||
if (apiTest.getName() != null) {
|
||||
ApiTestExample example = new ApiTestExample();
|
||||
example.createCriteria()
|
||||
.andNameEqualTo(apiTest.getName());
|
||||
if (apiTestMapper.selectByExample(example).size() > 0) {
|
||||
MSException.throwException(Translator.get("api_test_name_already_exists"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ApiTestWithBLOBs createTest(SaveAPITestRequest request) {
|
||||
ApiTestExample example = new ApiTestExample();
|
||||
example.createCriteria().andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId());
|
||||
|
|
|
@ -95,4 +95,5 @@ options=options
|
|||
please_input_workspace_member=Please input workspace merber
|
||||
test_case_report_template_repeat=The workspace has the same name template
|
||||
plan_name_already_exists=Test plan name already exists
|
||||
test_case_already_exists_excel=There are duplicate test cases in the import file
|
||||
test_case_already_exists_excel=There are duplicate test cases in the import file
|
||||
api_test_name_already_exists=Test name already exists
|
|
@ -96,3 +96,4 @@ please_input_workspace_member=请填写该工作空间相关人员
|
|||
test_case_report_template_repeat=同一工作空间下不能存在同名模版
|
||||
plan_name_already_exists=测试计划名称已存在
|
||||
test_case_already_exists_excel=导入文件中存在重复用例
|
||||
api_test_name_already_exists=测试名称已经存在
|
||||
|
|
|
@ -95,4 +95,5 @@ options=選項
|
|||
please_input_workspace_member=請填寫該工作空間相關人員
|
||||
test_case_report_template_repeat=同壹工作空間下不能存在同名模版
|
||||
plan_name_already_exists=測試計劃名稱已存在
|
||||
test_case_already_exists_excel=導入文件中存在重復用例
|
||||
test_case_already_exists_excel=導入文件中存在重復用例
|
||||
api_test_name_already_exists=測試名稱已經存在
|
Loading…
Reference in New Issue