From e786030350f2948fc6a3a997ca8c93c92e6e01a1 Mon Sep 17 00:00:00 2001
From: Jinquan_Ou <Jinquan@gdut.com>
Date: 星期六, 18 三月 2023 11:47:28 +0800
Subject: [PATCH] 修改数据库1.0

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZfPropertyController.java |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZfPropertyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZfPropertyController.java
index 1fada30..73754b0 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZfPropertyController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZfPropertyController.java
@@ -1,11 +1,16 @@
 package com.ruoyi.web.controller.system;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ServletUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.domain.PageParams;
 import com.ruoyi.domain.ZfProperty;
 import com.ruoyi.service.IZfPropertyService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -14,6 +19,9 @@
 import javax.servlet.http.HttpServletResponse;
 import java.util.Arrays;
 import java.util.List;
+
+import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
+import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
 
 /**
  * @Version 1.0
@@ -28,10 +36,10 @@
     private IZfPropertyService zfPropertyService;
 
     @GetMapping("/all")
-    public TableDataInfo  listAll(){
-        startPage();
-        List<ZfProperty> list = zfPropertyService.list();
-        return getDataTable(list);
+    public AjaxResult  listAll(ZfProperty zfProperty){
+        Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
+        Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
+        return zfPropertyService.selectUserList(zfProperty,pageNum,pageSize);
     }
 
 //    /**
@@ -52,9 +60,9 @@
 //    @PreAuthorize("@ss.hasPermi('system:property:export')")
     @Log(title = "瀹跺涵璧勪骇璁板綍", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response)
+    public void export(HttpServletResponse response,ZfProperty zfProperty)
     {
-        List<ZfProperty> list = zfPropertyService.list();
+        List<ZfProperty> list = zfPropertyService.selectByCondition(zfProperty);
         ExcelUtil<ZfProperty> util = new ExcelUtil<ZfProperty>(ZfProperty.class);
         util.exportExcel(response, list, "瀹跺涵璧勪骇璁板綍鏁版嵁");
     }

--
Gitblit v1.9.1