From 9a4b09e6a32b4510e1e9c4fb13d6cb90b896abe4 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期二, 16 七月 2024 21:23:26 +0800
Subject: [PATCH] 修改分页查询

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java
index 5c7b625..6e909fe 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZHonorController.java
@@ -50,10 +50,23 @@
         return zHonorService.selectDataList(zHonor,pageNum,pageSize);
     }
 
+    @GetMapping("/type")
+    public AjaxResult listType(){
+        return zHonorService.listType();
+    }
+
+    /**
+     * 鏍规嵁id鏌ヨ
+     */
+    @GetMapping()
+    public AjaxResult listById(Long id){
+        return AjaxResult.success(zHonorService.getById(id));
+    }
+
     /**
      * 妯℃澘
      */
-    @GetMapping("/model")
+    @PostMapping("/model")
     public void getModel(HttpServletResponse response){
         ZHonor zHonor = new ZHonor();
         List<ZHonor> emptyList = Collections.singletonList(zHonor);
@@ -66,10 +79,10 @@
      */
 //    @PreAuthorize("@ss.hasPermi('system:property:export')")
     @Log(title = "璇佷欢銆佽崳瑾夈�佽祫璐ㄨ褰�", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, ZHonor zHonor)
+    @PostMapping(value = {"/export/{ids}","/export"})
+    public void export(HttpServletResponse response,@PathVariable(required = false) Long[] ids)
     {
-        List<ZHonor> list = zHonorService.selectCondition(zHonor);
+        List<ZHonor> list = zHonorService.selectByIds(ids);
         log.info("瀵煎嚭璁板綍涓�:{}",list);
         ExcelUtil<ZHonor> util = new ExcelUtil<>(ZHonor.class);
         util.exportExcel(response, list, "璇佷欢銆佽崳瑾夈�佽祫璐ㄨ褰曟暟鎹�");

--
Gitblit v1.9.1