| | |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.all.PermsService; |
| | | import com.lf.server.service.all.UploadAttachService; |
| | | import com.lf.server.service.data.DownloadService; |
| | | import com.lf.server.service.sys.ResService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | TokenService tokenService; |
| | | |
| | | @Autowired |
| | | UploadAttachService uploadAttachService; |
| | | PermsService permsService; |
| | | |
| | | @Autowired |
| | | PermsService permsService; |
| | | DownloadService downloadService; |
| | | |
| | | @Autowired |
| | | UploadAttachService uploadAttachService; |
| | | |
| | | private final static String TAB_NAME = "lf.sys_res"; |
| | | |
| | |
| | | public void downloadForView(String guid, HttpServletResponse res) { |
| | | uploadAttachService.download(guid, true, res); |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "请求下载") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "guids", value = "附件Guid数组", dataType = "String", paramType = "body", allowMultiple = true, example = "e5b6ae0889b88111f13a4b6e048348db,fa4f299e901a0c46e634f8fcc8185c0c") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/downloadReq") |
| | | public ResponseMsg<Object> downloadReq(String[] guids, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | if (null == guids || guids.length == 0) { |
| | | return fail("附件Guid数组为空"); |
| | | } |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | //String guid = downloadService.zipFiles(ue, list, reqEntity.getPwd()); |
| | | |
| | | return success(""); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | } |