From 3eda21a5a601c808b4e7ef7bd56535de96e3d7ed Mon Sep 17 00:00:00 2001 From: feige <feige@qq.com> Date: 星期三, 17 五月 2023 11:45:18 +0800 Subject: [PATCH] 添加了两个导出接口一个是选择了id的,一个是没有选择的 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java index 9151187..6e78170 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java @@ -65,7 +65,20 @@ // @PreAuthorize("@ss.hasPermi('system:property:export')") @Log(title = "瀹跺涵澶т簨浠惰褰�", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, @PathVariable Long[] ids) { + public void export(HttpServletResponse response, ZfEvent zfEvent) { + List<ZfEvent> list = zfEventService.selectByCondition(zfEvent); + log.info("瀵煎嚭璁板綍涓�:{}", list); + ExcelUtil<ZfEvent> util = new ExcelUtil<>(ZfEvent.class); + util.exportExcel(response, list, "瀹跺涵澶т簨浠惰褰曟暟鎹�"); + + } + /** + * 瀵煎嚭瀹跺涵澶т簨浠惰褰曞垪琛� + */ +// @PreAuthorize("@ss.hasPermi('system:property:export')") + @Log(title = "瀹跺涵澶т簨浠惰褰�", businessType = BusinessType.EXPORT) + @PostMapping("/export1") + public void export1(HttpServletResponse response, @PathVariable Long[] ids) { List<ZfEvent> list = zfEventService.selectByIds(ids); log.info("瀵煎嚭璁板綍涓�:{}", list); ExcelUtil<ZfEvent> util = new ExcelUtil<>(ZfEvent.class); -- Gitblit v1.9.1