| | |
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.core.constant.Constants;
|
| | | import com.ruoyi.common.core.constant.UserConstants;
|
| | | import com.ruoyi.common.core.utils.SecurityUtils;
|
| | | import com.ruoyi.common.core.utils.StringUtils;
|
| | | import com.ruoyi.common.security.utils.SecurityUtils;
|
| | | import com.ruoyi.system.api.domain.SysRole;
|
| | | import com.ruoyi.system.api.domain.SysUser;
|
| | | import com.ruoyi.system.domain.SysMenu;
|
| | |
| | | router.setName(getRouteName(menu));
|
| | | router.setPath(getRouterPath(menu));
|
| | | router.setComponent(getComponent(menu));
|
| | | router.setQuery(menu.getQuery());
|
| | | router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
|
| | | List<SysMenu> cMenus = menu.getChildren();
|
| | | if (!cMenus.isEmpty() && cMenus.size() > 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()))
|
| | |
| | | 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.getQuery());
|
| | | childrenList.add(children);
|
| | | router.setChildren(childrenList);
|
| | | }
|