fix(接口测试): 复制测试判断重名
This commit is contained in:
parent
1f6fffad2c
commit
ac73c09544
|
@ -133,7 +133,12 @@ public class APITestService {
|
||||||
|
|
||||||
public void copy(SaveAPITestRequest request) {
|
public void copy(SaveAPITestRequest request) {
|
||||||
checkQuota();
|
checkQuota();
|
||||||
checkNameExist(request);
|
|
||||||
|
ApiTestExample example = new ApiTestExample();
|
||||||
|
example.createCriteria().andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId());
|
||||||
|
if (apiTestMapper.countByExample(example) > 0) {
|
||||||
|
MSException.throwException(Translator.get("load_test_already_exists"));
|
||||||
|
}
|
||||||
|
|
||||||
// copy test
|
// copy test
|
||||||
ApiTest copy = get(request.getId());
|
ApiTest copy = get(request.getId());
|
||||||
|
|
Loading…
Reference in New Issue