feat(接口定义):用例名重复
--bug=1006476 --user=赵勇 【github#6059】删除c... https://www.tapd.cn/55049933/s/1045496
This commit is contained in:
parent
20127bc205
commit
f1b9ffea94
|
@ -280,7 +280,7 @@ public class ApiTestCaseService {
|
||||||
public ApiTestCase getSameCase(SaveApiTestCaseRequest request) {
|
public ApiTestCase getSameCase(SaveApiTestCaseRequest request) {
|
||||||
ApiTestCaseExample example = new ApiTestCaseExample();
|
ApiTestCaseExample example = new ApiTestCaseExample();
|
||||||
ApiTestCaseExample.Criteria criteria = example.createCriteria();
|
ApiTestCaseExample.Criteria criteria = example.createCriteria();
|
||||||
criteria.andNameEqualTo(request.getName()).andApiDefinitionIdEqualTo(request.getApiDefinitionId());
|
criteria.andStatusNotEqualTo("Trash").andNameEqualTo(request.getName()).andApiDefinitionIdEqualTo(request.getApiDefinitionId());
|
||||||
if (StringUtils.isNotBlank(request.getId())) {
|
if (StringUtils.isNotBlank(request.getId())) {
|
||||||
criteria.andIdNotEqualTo(request.getId());
|
criteria.andIdNotEqualTo(request.getId());
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,7 @@ public interface ParamConstants {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,6 +158,12 @@ public class FileService {
|
||||||
private FileType getFileType(String filename) {
|
private FileType getFileType(String filename) {
|
||||||
int s = filename.lastIndexOf(".") + 1;
|
int s = filename.lastIndexOf(".") + 1;
|
||||||
String type = filename.substring(s);
|
String type = filename.substring(s);
|
||||||
|
FileType type1 =FileType.valueOf(type.toUpperCase());
|
||||||
|
for (FileType type2:FileType.values()) {
|
||||||
|
if (!type1.equals(type2)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
return FileType.valueOf(type.toUpperCase());
|
return FileType.valueOf(type.toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue