feat(system): 新增用户列表查询接口

- 在SysUserController中添加selectUserList方法- 实现根据条件查询用户列表功能
- 配置权限注解确保接口安全性
- 返回封装后的AjaxResult结果集
-优化包导入顺序提升代码可读性
master
zangch@mesnac.com 2 months ago
parent b098fc19d0
commit d79daf84f2

@ -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<SysUser> list = userService.selectUserList(user);
return success(list);
}
}

Loading…
Cancel
Save