From ed8c7a5effd0d423ce1118b680ecdca6fe732609 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 02 七月 2025 16:43:13 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.11.205:9000/r/P2022036_Service --- src/main/java/com/lf/server/controller/show/PipelineController.java | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/lf/server/controller/show/PipelineController.java b/src/main/java/com/lf/server/controller/show/PipelineController.java index 3a13a68..c57fc39 100644 --- a/src/main/java/com/lf/server/controller/show/PipelineController.java +++ b/src/main/java/com/lf/server/controller/show/PipelineController.java @@ -58,7 +58,7 @@ return success(rs); } catch (Exception ex) { - return fail(ex.getMessage(), null); + return fail(ex, null); } } @@ -89,7 +89,7 @@ return success(map); } catch (Exception ex) { - return fail(ex.getMessage(), null); + return fail(ex, null); } } @@ -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,23 +114,27 @@ if (!DownloadService.decryptPwd(pe)) { return fail("瀵嗙爜瑙e瘑澶辫触", 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); + return fail(ex, null); } } @@ -153,15 +157,15 @@ return fail("鐢ㄦ埛鏈櫥褰�", null); } - int count = downloadService.selectCountForUser(ue.getCreateUser(), 5, name); + int count = downloadService.selectCountForUser(ue.getId(), "5", name); if (count == 0) { return success(0, null); } - List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getCreateUser(), 3, name, pageSize, pageSize * (pageIndex - 1)); + List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), "5", name, pageSize, pageSize * (pageIndex - 1)); return success(count, rs); } catch (Exception ex) { - return fail(ex.getMessage(), null); + return fail(ex, null); } } @@ -199,7 +203,7 @@ return success(file.exists()); } catch (Exception ex) { - return fail(ex.getMessage(), false); + return fail(ex, false); } } -- Gitblit v1.9.3