| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.core.constant.UserConstants; |
| | | import org.dromara.common.core.utils.MapstructUtils; |
| | | import org.dromara.common.core.utils.StreamUtils; |
| | |
| | | import org.dromara.system.mapper.SysRoleMenuMapper; |
| | | import org.dromara.system.mapper.SysTenantPackageMapper; |
| | | import org.dromara.system.service.ISysMenuService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | |
| | | if (tenantPackage.getMenuCheckStrictly()) { |
| | | parentIds = baseMapper.selectObjs(new LambdaQueryWrapper<SysMenu>() |
| | | .select(SysMenu::getParentId) |
| | | .in(SysMenu::getMenuId, menuIds), Convert::toLong); |
| | | .in(SysMenu::getMenuId, menuIds), x -> {return Convert.toLong(x);}); |
| | | } |
| | | return baseMapper.selectObjs(new LambdaQueryWrapper<SysMenu>() |
| | | .in(SysMenu::getMenuId, menuIds) |
| | | .notIn(CollUtil.isNotEmpty(parentIds), SysMenu::getMenuId, parentIds), Convert::toLong); |
| | | .notIn(CollUtil.isNotEmpty(parentIds), SysMenu::getMenuId, parentIds), x -> {return Convert.toLong(x);}); |
| | | } |
| | | |
| | | /** |
| | |
| | | List<RouterVo> childrenList = new ArrayList<>(); |
| | | RouterVo children = new RouterVo(); |
| | | children.setPath(menu.getPath()); |
| | | children.setComponent(menu.getComponentInfo()); |
| | | children.setComponent(menu.getComponent()); |
| | | children.setName(StringUtils.capitalize(menu.getPath())); |
| | | children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); |
| | | children.setQuery(menu.getQueryParam()); |