|
@ -291,6 +291,37 @@ public class TestReportController { |
|
|
return R.ok("操作成功!"); |
|
|
return R.ok("操作成功!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 前端用户-上传测试数据 |
|
|
|
|
|
* |
|
|
|
|
|
*/ |
|
|
|
|
|
@SneakyThrows |
|
|
|
|
|
@Log(title = "测试数据管理", businessType = BusinessType.INSERT) |
|
|
|
|
|
@PostMapping(value = "/uploadTestDataV2", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
|
|
|
|
|
public R uploadTestData( @RequestPart("file") MultipartFile file, |
|
|
|
|
|
@RequestPart("taskName") String taskName |
|
|
|
|
|
) { |
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isEmpty(taskName)) { |
|
|
|
|
|
return R.fail("测试数据名称不能为空!"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// testReportService.check(reportName); |
|
|
|
|
|
TestReport testReport = new TestReport(); |
|
|
|
|
|
if(file != null ){ |
|
|
|
|
|
SysOssVo toolVo = iSysOssService.upload(file,true); |
|
|
|
|
|
testReport.setTestDataPath(toolVo.getOriginalName()); |
|
|
|
|
|
testReport.setTestDataOssId(toolVo.getOssId()); |
|
|
|
|
|
}else { |
|
|
|
|
|
return R.fail("测试数据不能为空!"); |
|
|
|
|
|
} |
|
|
|
|
|
testReport.setTestStatus("测试中"); |
|
|
|
|
|
testReport.setTaskName(taskName); |
|
|
|
|
|
testReport.setCreateTime(new Date()); |
|
|
|
|
|
testReportService.save(testReport); |
|
|
|
|
|
return R.ok("操作成功!"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 前端用户-上传测试App |
|
|
* 前端用户-上传测试App |
|
|
* |
|
|
* |
|
|