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); 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 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(); } 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) {