管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-03-06 44c9a9a4f3543fd2d0ec6bc66f952e5f82942544
src/main/java/com/lf/server/controller/sys/ResController.java
@@ -7,6 +7,7 @@
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;
@@ -37,10 +38,13 @@
    TokenService tokenService;
    @Autowired
    UploadAttachService uploadAttachService;
    PermsService permsService;
    @Autowired
    PermsService permsService;
    DownloadService downloadService;
    @Autowired
    UploadAttachService uploadAttachService;
    private final static String TAB_NAME = "lf.sys_res";
@@ -309,4 +313,26 @@
    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);
        }
    }
}