From c3a3fd61c88e008fa7857b748c227be46e8a76e5 Mon Sep 17 00:00:00 2001 From: whywhyo <1511349576@qq.com> Date: 星期六, 05 八月 2023 11:45:17 +0800 Subject: [PATCH] 15648 --- zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java | 11 +++++++++++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java | 14 ++++++++++++-- ruoyi-admin/src/main/resources/application-druid.yml | 4 ++-- zhang-content/src/main/java/com/ruoyi/service/ZSelfNoteService.java | 3 +++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java index bd4919f..949ba2c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java @@ -73,8 +73,18 @@ */ // @PreAuthorize("@ss.hasPermi('system:property:export')") @Log(title = "涓汉璁颁簨鏈褰�", businessType = BusinessType.EXPORT) - @PostMapping("/export/{ids}") - public void export(HttpServletResponse response,@PathVariable Long[] ids) + @PostMapping("/export") + public void export(HttpServletResponse response) + { + List<ZSelfNote> list = zSelfNoteService.selectByCondition(); + log.info("瀵煎嚭璁板綍涓�:{}",list); + ExcelUtil<ZSelfNote> util = new ExcelUtil<>(ZSelfNote.class); + util.exportExcel(response, list, "涓汉璁颁簨鏈褰曟暟鎹�"); + } + + @Log(title = "涓汉璁颁簨鏈褰�", businessType = BusinessType.EXPORT) + @PostMapping("/export1/{ids}") + public void export1(HttpServletResponse response,@PathVariable Long[] ids) { List<ZSelfNote> list = zSelfNoteService.selectByIds(ids); log.info("瀵煎嚭璁板綍涓�:{}",list); diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 045d564..b2e66b2 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,8 +6,8 @@ druid: # 涓诲簱鏁版嵁婧� master: -# url: jdbc:mysql://47.93.189.255:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - url: jdbc:mysql://localhost:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://47.93.189.255:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# url: jdbc:mysql://localhost:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: ZhangApp123! # password: 123456 diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZSelfNoteService.java b/zhang-content/src/main/java/com/ruoyi/service/ZSelfNoteService.java index 4a459f1..81c7fe2 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/ZSelfNoteService.java +++ b/zhang-content/src/main/java/com/ruoyi/service/ZSelfNoteService.java @@ -25,4 +25,7 @@ AjaxResult importExcel(MultipartFile file); AjaxResult mySave(ZSelfNote zSelfNote); + + List<ZSelfNote> selectByCondition(); + } diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java index 4a56b55..74a7b83 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java @@ -113,6 +113,17 @@ } @Override + public List<ZSelfNote> selectByCondition() { + + SysUser user = SecurityUtils.getLoginUser().getUser(); + Long userId = user.getUserId(); + + ZSelfNote zSelfNote = new ZSelfNote(); + LambdaQueryWrapper<ZSelfNote> lqw = buildCondition(zSelfNote, userId); + return list(lqw); + } + + @Override @Transactional public AjaxResult importExcel(MultipartFile file) { -- Gitblit v1.9.1