提交 f529be99 authored 作者: 黄夏豪's avatar 黄夏豪

fix(base): 修了ExecutionController会出现空指针的情况

上级 ac1c4fa2
......@@ -331,6 +331,7 @@ public class CaseActuator implements Actuator {
}
break;
} catch (Exception e) {
e.printStackTrace();
TestCaseReport testCaseReport = new TestCaseReport(
caseStartTime,
LocalDateTime.now(),
......
......@@ -106,7 +106,6 @@ public class ExecutionRecordController {
List<ExecutionRecord> results = getExecutionRecords(userId, testDataId, testCaseId, uniqueKey, type);
Map<Long, Map<Long, Map<Long, List<String>>>> resultMap = new HashMap<>();
return CommonResult.success(results, "查询成功");
}
/**
......@@ -132,7 +131,9 @@ public class ExecutionRecordController {
for (ExecutionRecord result : results) {
ExecutionRecordVo recordVo = new ExecutionRecordVo();
BeanUtils.copyProperties(result, recordVo);
recordVo.setJobName(testJobService.getById(result.getTestJobId()).getName());
if (result.getTestJobId()>0){
recordVo.setJobName(testJobService.getById(result.getTestJobId()).getName());
}
recordVo.setCaseName(testCaseService.getById(result.getTestCaseId()).getName());
if (recordVo.getTestDataId() != -1L) {
recordVo.setDataName(testDataService.getById(result.getTestDataId()).getName());
......
......@@ -127,9 +127,9 @@ public class SwaggerController {
Object summary = objRequestMaps.get("summary");
List<Parameter> parameterAllList = new ArrayList<>();
InterfaceInformation interfaceInformation = new InterfaceInformation();
if (parameters != null) {
if (true) {
@SuppressWarnings(value = "all")
List<String> parameterLists = (List<String>) parameters;
List<String> parameterLists = parameters == null ? new ArrayList<>(): (List<String>)parameters;
for (Object parameterList : parameterLists) {
@SuppressWarnings(value = "unchecked")
Map<String, String> parameterMaps = (Map<String, String>) parameterList;
......
......@@ -20,8 +20,8 @@ spring:
password: 123456
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
type-enums-package: org.matrix.enums
baseJsPath: syntaxCheck.js
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论