管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-04-11 4c882f00d9ee90d43a1c330683a612063ce64f04
src/main/java/com/lf/server/controller/show/DataLibController.java
@@ -165,28 +165,23 @@
    })
    @ResponseBody
    @PostMapping(value = "/downloadReq")
    public ResponseMsg<Object> downloadReq(@RequestBody DownloadReqEntity reqEntity, HttpServletRequest req, HttpServletResponse res) {
    public ResponseMsg<Object> downloadReq(@RequestBody DownloadReqEntity dr, HttpServletRequest req, HttpServletResponse res) {
        try {
            if (null == reqEntity || StringHelper.isEmpty(reqEntity.getPwd())) {
            if (null == dr || StringHelper.isEmpty(dr.getPwd())) {
                return fail("密码不能为空");
            }
            if (null == reqEntity.getIds() || reqEntity.getIds().isEmpty()) {
            if (null == dr.getIds() || dr.getIds().isEmpty()) {
                return fail("请选择要下载的文件");
            }
            if (!DownloadService.decryptPwd(reqEntity)) {
            if (!DownloadService.decryptPwd(dr)) {
                return fail("密码解密失败", null);
            }
            if (StringHelper.isPwdInvalid(reqEntity.getPwd())) {
            if (StringHelper.isPwdInvalid(dr.getPwd())) {
                return fail("密码不符合要求");
            }
            List<MetaEntity> list = metaService.selectMetaFiles(reqEntity.getIds());
            if (null == list || list.isEmpty()) {
                return fail("没有找到元数据");
            }
            UserEntity ue = tokenService.getCurrentUser(req);
            String guid = downloadService.zipFiles(ue, list, reqEntity.getPwd());
            String guid = metaService.downloadMeteReq(ue, dr);
            return success(guid);
        } catch (Exception ex) {