| | |
| | | roleMenus = allMenus; |
| | | } |
| | | // 非超级管理员并且不是顶部菜单请求则返回对应角色权限菜单 |
| | | else if (!AuthUtil.isAdministrator() && Func.isEmpty(topMenuId)) { |
| | | else if (!VciBaseUtil.checkAdminTenant() && Func.isEmpty(topMenuId)) { |
| | | roleMenus = tenantPackageMenu(baseMapper.roleMenuByRoleId(Func.toLongList(roleId))); |
| | | } |
| | | // 顶部菜单请求返回对应角色权限菜单 |
| | |
| | | LambdaQueryWrapper<Menu> wrapper = Wrappers.<Menu>query() |
| | | .lambda() |
| | | .in(Menu::getCode, codes) |
| | | .eq(Menu::getIsDeleted,0) /*未被删除*/ |
| | | .eq(Menu::getIsDeleted,BladeConstant.DB_NOT_DELETED) /*未被删除*/ |
| | | .eq(Menu::getCategory,1) /*菜单类型不能为按钮*/ |
| | | .orderByAsc(Menu::getCode); /*根据code排序与classify的btmtypeid对应*/ |
| | | // 超管不用根据角色来查询 |
| | |
| | | return this.saveBatch(newButtons) ? R.success("按钮克隆成功!"):R.fail("按钮克隆失败!"); |
| | | } |
| | | |
| | | /** |
| | | * 根据主键获取菜单信息 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Menu> getMenuListById(List<String> ids,String parentId) { |
| | | LambdaQueryWrapper<Menu> wrapper = Wrappers.<Menu>query() |
| | | .lambda().eq(Menu::getCategory, "2") |
| | | .eq(Menu::getIsDeleted,BladeConstant.DB_NOT_DELETED); |
| | | if(VciBaseUtil.checkAdminTenant()){ |
| | | wrapper.eq(Menu::getParentId,parentId); |
| | | }else { |
| | | wrapper.in(Menu::getId, ids); |
| | | } |
| | | List<Menu> menuList = this.list(wrapper); |
| | | return menuList; |
| | | } |
| | | |
| | | } |