feat(接口定义):用例名重复
--bug=1006476 --user=赵勇 【github#6059】删除c... https://www.tapd.cn/55049933/s/1045496
This commit is contained in:
parent
c2987076eb
commit
9f49f57a8f
|
@ -273,7 +273,7 @@ public class ApiTestCaseService {
|
|||
public ApiTestCase getSameCase(SaveApiTestCaseRequest request) {
|
||||
ApiTestCaseExample example = new ApiTestCaseExample();
|
||||
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())) {
|
||||
criteria.andIdNotEqualTo(request.getId());
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ public interface ParamConstants {
|
|||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
|
|
@ -158,6 +158,12 @@ public class FileService {
|
|||
private FileType getFileType(String filename) {
|
||||
int s = filename.lastIndexOf(".") + 1;
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue