whywhyo
2023-08-05 c3a3fd61c88e008fa7857b748c227be46e8a76e5
15648
4个文件已修改
32 ■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSelfNoteController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZSelfNoteService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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) {