From a07da15e976e4095f1f94b286ed4b09b5160c1cd Mon Sep 17 00:00:00 2001 From: admin <417727563@qq.com> Date: Fri, 5 Jul 2024 18:08:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86-=E4=B8=93?= =?UTF-8?q?=E5=AE=B6=E7=AE=A1=E7=90=8607?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/SysRoleController.java | 23 ++++++++++++++++ .../system/controller/SysUserController.java | 27 +++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysRoleController.java b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysRoleController.java index 55a477db..15eeeaa3 100644 --- a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysRoleController.java +++ b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysRoleController.java @@ -266,6 +266,29 @@ public class SysRoleController { } return result; } + + /** + * 查询系统角色(排除:总管理) + * + * @return + */ + //@RequiresPermissions("system:role:queryallNoByTenant") + @RequestMapping(value = "/queryallExcludeByTenant", method = RequestMethod.GET) + public Result> queryallExcludeByTenant() { + Result> result = new Result<>(); + LambdaQueryWrapper query = new LambdaQueryWrapper() + .ne(SysRole::getRoleCode, "admin") // 排除 roleCode 为 "admin" + .ne(SysRole::getRoleCode, "user"); // 排除 roleCode 为 "user" + + List list = sysRoleService.list(query); + if(list==null||list.size()<=0) { + result.error500("未找到角色信息"); + }else { + result.setResult(list); + result.setSuccess(true); + } + return result; + } /** * 校验角色编码唯一 diff --git a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java index a8ed75d0..039df58d 100644 --- a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java +++ b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java @@ -152,6 +152,33 @@ public class SysUserController { return sysUserService.queryPageList(req, queryWrapper, pageSize, pageNo); } + + /** + * 获取系统用户数据(查询全部用户,不做租户隔离) + * + * @param user + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@RequiresPermissions("system:user:listAll") + @RequestMapping(value = "/listZjAll", method = RequestMethod.GET) + public Result> queryZjAllPageList(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap()); + + Result> result = new Result>(); + Page page = new Page(pageNo, pageSize); +// String roleId = req.getParameter("roleId"); + String roleId = "1731948288626339841"; + String username = req.getParameter("username"); + IPage pageList = sysUserService.getUserByRoleId(page,roleId,username); + result.setSuccess(true); + result.setResult(pageList); + return result; + } + /** * 获取系统用户数据(查询全部用户,不做租户隔离) *这个是用于专家、学生、组委会查看自己的信息