From cabed052a19aa1be422afb5dcf7bc73bda36277d Mon Sep 17 00:00:00 2001 From: caixiang <939387484@qq.com> Date: Mon, 3 Apr 2023 11:13:18 +0800 Subject: [PATCH] commit for pull --- .../service/impl/SysRoleServiceImpl.java | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/ym-admin/src/main/java/com/cnbm/admin/service/impl/SysRoleServiceImpl.java b/ym-admin/src/main/java/com/cnbm/admin/service/impl/SysRoleServiceImpl.java index cef33a3..ae553db 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/service/impl/SysRoleServiceImpl.java +++ b/ym-admin/src/main/java/com/cnbm/admin/service/impl/SysRoleServiceImpl.java @@ -55,29 +55,11 @@ public class SysRoleServiceImpl extends BaseServiceImpl list(Map params) { - List entityList = baseDao.selectList(getWrapper2(params)); + List entityList = baseDao.selectList(getWrapper(params)); return ConvertUtils.sourceToTarget(entityList, SysRoleDTO.class); } - private QueryWrapper getWrapper2(Map params){ - String name = (String)params.get("name"); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.like(StringUtils.isNotBlank(name), "name", name); - -// //普通管理员,只能查询所属部门及子部门的数据 -// UsernamePasswordAuthenticationToken authentication = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthentication(); -// LoginUser loginUser = (LoginUser) authentication.getPrincipal(); -// SysUserEntity user = loginUser.getSysUserEntity(); -// if(!Objects.isNull(user.getSuperAdmin()) && (user.getSuperAdmin() == SuperAdminEnum.NO.value() || )) { -// List deptIdList = sysDeptService.getSubDeptIdList(user.getDeptId()); -// wrapper.in(deptIdList != null, "dept_id", deptIdList); -// } - - return wrapper; - } - private QueryWrapper getWrapper(Map params){ String name = (String)params.get("name");