From 9c3cf692ec5c32a3df450b65a5882ccb6f9fc189 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期三, 17 十一月 2021 11:57:30 +0800
Subject: [PATCH] 优化导出数据操作

---
 src/main/resources/vm/java/controller.java.vm |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/vm/java/controller.java.vm b/src/main/resources/vm/java/controller.java.vm
index 4232009..38939c9 100644
--- a/src/main/resources/vm/java/controller.java.vm
+++ b/src/main/resources/vm/java/controller.java.vm
@@ -1,6 +1,7 @@
 package ${packageName}.controller;
 
 import java.util.List;
+import javax.servlet.http.HttpServletResponse;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -61,12 +62,12 @@
      */
     @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')")
     @Log(title = "${functionName}", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(${ClassName} ${className})
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ${ClassName} ${className})
     {
         List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
         ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class);
-        return util.exportExcel(list, "${functionName}鏁版嵁");
+        util.exportExcel(response, list, "${functionName}鏁版嵁");
     }
 
     /**

--
Gitblit v1.9.3