| | |
| | | public void downloadFile(String guid, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | if (StringHelper.isEmpty(guid)) { |
| | | WebHelper.writeInfo(HttpStatus.UNAUTHORIZED, "找不到文件ID", res); |
| | | WebHelper.writeInfo(HttpStatus.BAD_REQUEST, "找不到文件ID", res); |
| | | return; |
| | | } |
| | | |
| | |
| | | de.setDownloadUser(ue.getId()); |
| | | int rows = downloadService.update(de); |
| | | |
| | | String filePath = exportService.getDownloadFilePath(de); |
| | | String filePath = downloadService.getDownloadFilePath(de); |
| | | WebHelper.download(filePath, de.getName(), res); |
| | | } catch (Exception ex) { |
| | | WebHelper.writeInfo(HttpStatus.ERROR, ex.getMessage(), res); |