Merge branch 'dev' of bin.github.com:fit2cloudrd/metersphere-server into dev
This commit is contained in:
commit
61715c2d52
|
@ -33,11 +33,11 @@ public class LoadTestController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/save", consumes = {"multipart/form-data"})
|
||||
public void save(
|
||||
public String save(
|
||||
@RequestPart("request") SaveTestPlanRequest request,
|
||||
@RequestPart(value = "file") MultipartFile file
|
||||
) {
|
||||
loadTestService.save(request, file);
|
||||
return loadTestService.save(request, file);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/edit", consumes = {"multipart/form-data"})
|
||||
|
|
|
@ -71,7 +71,7 @@ public class LoadTestService {
|
|||
fileService.deleteFileByTestId(request.getId());
|
||||
}
|
||||
|
||||
public void save(SaveTestPlanRequest request, MultipartFile file) {
|
||||
public String save(SaveTestPlanRequest request, MultipartFile file) {
|
||||
if (file == null) {
|
||||
throw new IllegalArgumentException("文件不能为空!");
|
||||
}
|
||||
|
@ -84,6 +84,8 @@ public class LoadTestService {
|
|||
loadTestFile.setTestId(loadTest.getId());
|
||||
loadTestFile.setFileId(fileMetadata.getId());
|
||||
loadTestFileMapper.insert(loadTestFile);
|
||||
|
||||
return loadTest.getId();
|
||||
}
|
||||
|
||||
private LoadTestWithBLOBs saveLoadTest(SaveTestPlanRequest request) {
|
||||
|
|
Loading…
Reference in New Issue