管道基础大数据平台系统开发-【后端】-Server
1.6
13693261870
2023-01-06 d12b5b41ee33e7eb57f3c3fe00f4fae53eb93388
src/main/java/com/lf/server/controller/show/PipelineController.java
@@ -100,7 +100,7 @@
    })
    @ResponseBody
    @PostMapping(value = "/downloadReq")
    public ResponseMsg<Object> downloadReq(@RequestBody PipelineEntity pe) {
    public ResponseMsg<Object> downloadReq(@RequestBody PipelineEntity pe, HttpServletRequest req) {
        try {
            if (null == pe || StringHelper.isEmpty(pe.getPwd())) {
                return fail("密码不能为空");
@@ -114,21 +114,25 @@
            if (!DownloadService.decryptPwd(pe)) {
                return fail("密码解密失败", null);
            }
            if (!StringHelper.checkPwdValid(pe.getPwd())) {
            if (StringHelper.isPwdInvalid(pe.getPwd())) {
                return fail("密码不符合要求");
            }
            Map<String, Object> map = new HashMap<>(4);
            Map<String, List<PipelineEntity>> map = new HashMap<>(4);
            for (String tab : pe.getTabs()) {
                List<PipelineEntity> rs = pipelineService.selectPipeAnalysis(tab, pe.getGid());
                if (null != rs && rs.size() > 0) {
                    map.put(tab, rs);
                }
            }
            if (map.size() == 0) {
                return fail("查无数据");
            }
            //
            UserEntity ue = tokenService.getCurrentUser(req);
            String guid = pipelineService.createZipFile(ue, map, pe.getPwd());
            return success(map);
            return success(guid);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }