refactor(工作台): 性能测试加报告数量

--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016219
This commit is contained in:
guoyuqi 2022-08-24 11:43:23 +08:00 committed by 刘瑞斌
parent ffcbd8d7cb
commit 0854f26c79
3 changed files with 8 additions and 3 deletions

View File

@ -380,10 +380,15 @@ public class Swagger3Parser extends SwaggerAbstractParser {
} else if (schema instanceof ObjectSchema) { } else if (schema instanceof ObjectSchema) {
Object propertiesResult = parseSchemaPropertiesToJson(schema, refSet, infoMap); Object propertiesResult = parseSchemaPropertiesToJson(schema, refSet, infoMap);
return propertiesResult == null ? getDefaultValueByPropertyType(schema) : propertiesResult; return propertiesResult == null ? getDefaultValueByPropertyType(schema) : propertiesResult;
} else {
if (MapUtils.isNotEmpty(schema.getProperties())) {
Object propertiesResult = parseSchemaPropertiesToJson(schema, refSet, infoMap);
return propertiesResult == null ? getDefaultValueByPropertyType(schema) : propertiesResult;
} else { } else {
return getDefaultValueByPropertyType(schema); return getDefaultValueByPropertyType(schema);
} }
} }
}
private Object parseSchemaPropertiesToJson(Schema schema, Set<String> refSet, Map<String, Schema> infoMap) { private Object parseSchemaPropertiesToJson(Schema schema, Set<String> refSet, Map<String, Schema> infoMap) {
if (schema == null) return null; if (schema == null) return null;

View File

@ -2155,7 +2155,7 @@ public class ApiDefinitionService {
if (!resList.isEmpty()) { if (!resList.isEmpty()) {
List<String> ids = resList.stream().map(ApiDefinitionResult::getId).collect(Collectors.toList()); List<String> ids = resList.stream().map(ApiDefinitionResult::getId).collect(Collectors.toList());
List<ApiComputeResult> results = new ArrayList<>(); List<ApiComputeResult> results = new ArrayList<>();
if (request != null && request.getFilters().containsKey("status") && request.getFilters().get("status").get(0).equals("Trash")) { if (request != null && MapUtils.isNotEmpty(request.getFilters()) && request.getFilters().containsKey("status") && request.getFilters().get("status").get(0).equals("Trash")) {
results = extApiDefinitionMapper.selectByIdsAndStatusIsTrash(ids, projectId); results = extApiDefinitionMapper.selectByIdsAndStatusIsTrash(ids, projectId);
} else { } else {
results = extApiDefinitionMapper.selectByIdsAndStatusIsNotTrash(ids, projectId); results = extApiDefinitionMapper.selectByIdsAndStatusIsNotTrash(ids, projectId);

View File

@ -702,7 +702,7 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
if (CollectionUtils.isNotEmpty(repeatApiDefinitionWithBLOBs)) { if (CollectionUtils.isNotEmpty(repeatApiDefinitionWithBLOBs)) {
oldCaseMap = getOldCaseMap(repeatApiDefinitionWithBLOBs); oldCaseMap = getOldCaseMap(repeatApiDefinitionWithBLOBs);
} }
Map<String, ApiDefinitionWithBLOBs> repeatDataMap = null; Map<String, ApiDefinitionWithBLOBs> repeatDataMap = new HashMap<>();
Map<String, ApiDefinitionWithBLOBs> optionMap = new HashMap<>(); Map<String, ApiDefinitionWithBLOBs> optionMap = new HashMap<>();
if (chooseModule != null) { if (chooseModule != null) {