Commit f8dcfb09 by 284718418@qq.com

下载标记

parent a004e9cf
...@@ -224,7 +224,8 @@ public class DiskFilesController { ...@@ -224,7 +224,8 @@ public class DiskFilesController {
} }
@GetMapping(value = "/exportContract") @GetMapping(value = "/exportContract")
public void exportContract(@CurrentUser UserBean userBean, @ApiParam("文件ID") @RequestParam(required = true) Integer fileId, HttpServletResponse resp) { public void exportContract(@CurrentUser UserBean userBean, @ApiParam("文件ID") @RequestParam(required = true) Integer fileId,
@ApiParam("下载通道默认不传:我收到的列表下载传type=1") @RequestParam(required = false) Integer type, HttpServletResponse resp) {
if (fileId == null || fileId <= 0) { if (fileId == null || fileId <= 0) {
throw new CustomException("下载失败,请选择文件下载"); throw new CustomException("下载失败,请选择文件下载");
} }
...@@ -232,6 +233,9 @@ public class DiskFilesController { ...@@ -232,6 +233,9 @@ public class DiskFilesController {
if(StringUtils.isEmpty(diskFiles)){ if(StringUtils.isEmpty(diskFiles)){
throw new CustomException("下载失败,文件不存在"); throw new CustomException("下载失败,文件不存在");
} }
if(diskFiles.getDeleteFlag() == 1 && StringUtils.isEmpty(type)){
throw new CustomException("下载失败,该文件已删除");
}
InputStream fis = null; InputStream fis = null;
BufferedInputStream bis = null; BufferedInputStream bis = null;
OutputStream os; OutputStream os;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment