update 规范不公开方法访问控制修饰符为private
| | |
| | | * @param newAncestors 新的父ID集合 |
| | | * @param oldAncestors 旧的父ID集合 |
| | | */ |
| | | public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { |
| | | private void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { |
| | | List<SysDept> children = baseMapper.selectList(new LambdaQueryWrapper<SysDept>() |
| | | .apply(DataBaseHelper.findInSet(deptId, "ancestors"))); |
| | | List<SysDept> list = new ArrayList<>(); |
| | |
| | | * @param parentId 传入的父节点ID |
| | | * @return String |
| | | */ |
| | | public List<SysMenu> getChildPerms(List<SysMenu> list, int parentId) { |
| | | private List<SysMenu> getChildPerms(List<SysMenu> list, int parentId) { |
| | | List<SysMenu> returnList = new ArrayList<>(); |
| | | for (SysMenu t : list) { |
| | | // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点 |
| | |
| | | * |
| | | * @param role 角色对象 |
| | | */ |
| | | public int insertRoleMenu(SysRoleBo role) { |
| | | private int insertRoleMenu(SysRoleBo role) { |
| | | int rows = 1; |
| | | // 新增用户与角色管理 |
| | | List<SysRoleMenu> list = new ArrayList<SysRoleMenu>(); |
| | |
| | | * |
| | | * @param role 角色对象 |
| | | */ |
| | | public int insertRoleDept(SysRoleBo role) { |
| | | private int insertRoleDept(SysRoleBo role) { |
| | | int rows = 1; |
| | | // 新增角色与部门(数据权限)管理 |
| | | List<SysRoleDept> list = new ArrayList<SysRoleDept>(); |
| | |
| | | * @param packageId 租户套餐id |
| | | * @return 角色id |
| | | */ |
| | | public Long createTenantRole(String tenantId, Long packageId) { |
| | | private Long createTenantRole(String tenantId, Long packageId) { |
| | | // 获取租户套餐 |
| | | SysTenantPackage tenantPackage = sysTenantPackageMapper.selectById(packageId); |
| | | if (ObjectUtil.isNull(tenantPackage)) { |
| | |
| | | * @param user 用户对象 |
| | | * @param clear 清除已存在的关联数据 |
| | | */ |
| | | public void insertUserRole(SysUserBo user, boolean clear) { |
| | | private void insertUserRole(SysUserBo user, boolean clear) { |
| | | this.insertUserRole(user.getUserId(), user.getRoleIds(), clear); |
| | | } |
| | | |
| | |
| | | * @param user 用户对象 |
| | | * @param clear 清除已存在的关联数据 |
| | | */ |
| | | public void insertUserPost(SysUserBo user, boolean clear) { |
| | | private void insertUserPost(SysUserBo user, boolean clear) { |
| | | Long[] posts = user.getPostIds(); |
| | | if (ArrayUtil.isNotEmpty(posts)) { |
| | | if (clear) { |
| | |
| | | * @param roleIds 角色组 |
| | | * @param clear 清除已存在的关联数据 |
| | | */ |
| | | public void insertUserRole(Long userId, Long[] roleIds, boolean clear) { |
| | | private void insertUserRole(Long userId, Long[] roleIds, boolean clear) { |
| | | if (ArrayUtil.isNotEmpty(roleIds)) { |
| | | // 判断是否具有此角色的操作权限 |
| | | List<SysRoleVo> roles = roleMapper.selectRoleList(new LambdaQueryWrapper<>()); |