From 5fd51c437819f1c9d027a936db4ba2ee7cd2e053 Mon Sep 17 00:00:00 2001
From: ustcyc <yincun@163.com>
Date: 星期二, 07 一月 2025 15:02:58 +0800
Subject: [PATCH] 升级架构

---
 zhitan-admin/src/main/java/com/zhitan/web/controller/system/SysRoleController.java |   31 ++++++++++++-------------------
 1 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/zhitan-admin/src/main/java/com/zhitan/web/controller/system/SysRoleController.java b/zhitan-admin/src/main/java/com/zhitan/web/controller/system/SysRoleController.java
index 64653ce..93429cf 100644
--- a/zhitan-admin/src/main/java/com/zhitan/web/controller/system/SysRoleController.java
+++ b/zhitan-admin/src/main/java/com/zhitan/web/controller/system/SysRoleController.java
@@ -1,18 +1,6 @@
 package com.zhitan.web.controller.system;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import javax.annotation.Resource;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.zhitan.common.annotation.Log;
 import com.zhitan.common.core.controller.BaseController;
 import com.zhitan.common.core.domain.AjaxResult;
@@ -30,10 +18,17 @@
 import com.zhitan.system.service.ISysDeptService;
 import com.zhitan.system.service.ISysRoleService;
 import com.zhitan.system.service.ISysUserService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 瑙掕壊淇℃伅
- * 
+ *
  * @author zhitan
  */
 @RestController
@@ -57,10 +52,9 @@
 
     @PreAuthorize("@ss.hasPermi('system:role:list')")
     @GetMapping("/list")
-    public TableDataInfo list(SysRole role)
+    public TableDataInfo list(SysRole role, Long pageNum, Long pageSize)
     {
-        startPage();
-        List<SysRole> list = roleService.selectRoleList(role);
+        Page<SysRole> list = roleService.selectRolePage(role, pageNum, pageSize);
         return getDataTable(list);
     }
 
@@ -125,7 +119,7 @@
             return error("淇敼瑙掕壊'" + role.getRoleName() + "'澶辫触锛岃鑹叉潈闄愬凡瀛樺湪");
         }
         role.setUpdateBy(getUsername());
-        
+
         if (roleService.updateRole(role) > 0)
         {
             // 鏇存柊缂撳瓨鐢ㄦ埛鏉冮檺
@@ -208,7 +202,6 @@
     @GetMapping("/authUser/unallocatedList")
     public TableDataInfo unallocatedList(SysUser user)
     {
-        startPage();
         List<SysUser> list = userService.selectUnallocatedList(user);
         return getDataTable(list);
     }

--
Gitblit v1.9.3