|
@@ -24,6 +24,7 @@ import io.swagger.annotations.*;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
|
|
+import javax.servlet.ServletOutputStream;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.Valid;
|
|
|
|
|
@@ -64,6 +65,7 @@ import org.springblade.core.boot.ctrl.BladeController;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.io.File;
|
|
|
+import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
@@ -653,11 +655,11 @@ public class ArchivesAutoController extends BladeController {
|
|
|
/**
|
|
|
* 批量下载档案
|
|
|
*/
|
|
|
- @PostMapping(value = "/batchDownloadFileToZip", produces = {
|
|
|
- MediaType.APPLICATION_OCTET_STREAM_VALUE, MediaType.APPLICATION_JSON_VALUE})
|
|
|
+ @GetMapping(value = "/batchDownloadFileToZip")
|
|
|
@ApiOperationSupport(order = 19)
|
|
|
@ApiOperation(value = "批量下载档案")
|
|
|
- public void batchDownloadFileToZip(String ids, HttpServletResponse response) {
|
|
|
+ public void batchDownloadFileToZip(String ids, HttpServletResponse response) throws IOException {
|
|
|
+ ServletOutputStream outputStream = response.getOutputStream();
|
|
|
archivesAutoService.batchDownloadFileToZip(ids,response);
|
|
|
}
|
|
|
}
|