From d79daf84f2837691e852b32a95a19394a3a0b063 Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Wed, 29 Oct 2025 20:18:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(system):=20=E6=96=B0=E5=A2=9E=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在SysUserController中添加selectUserList方法- 实现根据条件查询用户列表功能 - 配置权限注解确保接口安全性 - 返回封装后的AjaxResult结果集 -优化包导入顺序提升代码可读性 --- .../controller/system/SysUserController.java | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/aucma-admin/src/main/java/com/aucma/web/controller/system/SysUserController.java b/aucma-admin/src/main/java/com/aucma/web/controller/system/SysUserController.java index fa2819e..504dd87 100644 --- a/aucma-admin/src/main/java/com/aucma/web/controller/system/SysUserController.java +++ b/aucma-admin/src/main/java/com/aucma/web/controller/system/SysUserController.java @@ -1,21 +1,5 @@ package com.aucma.web.controller.system; -import java.util.List; -import java.util.stream.Collectors; -import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang3.ArrayUtils; -import org.springframework.beans.factory.annotation.Autowired; -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 org.springframework.web.multipart.MultipartFile; import com.aucma.common.annotation.Log; import com.aucma.common.core.controller.BaseController; import com.aucma.common.core.domain.AjaxResult; @@ -31,6 +15,16 @@ import com.aucma.system.service.ISysDeptService; import com.aucma.system.service.ISysPostService; import com.aucma.system.service.ISysRoleService; import com.aucma.system.service.ISysUserService; +import org.apache.commons.lang3.ArrayUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.stream.Collectors; /** * 用户信息 @@ -248,4 +242,16 @@ public class SysUserController extends BaseController { return success(deptService.selectDeptTreeList(dept)); } + + + /** + * 获取用户列表 + */ + @PreAuthorize("@ss.hasPermi('system:user:list')") + @GetMapping("/selectUserList") + public AjaxResult selectUserList(SysUser user) + { + List list = userService.selectUserList(user); + return success(list); + } }