| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.TreeSelect; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | |
| | | /** |
| | | * 菜单信息 |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @RestController |
| | |
| | | @GetMapping(value = "/{menuId}") |
| | | public AjaxResult getInfo(@PathVariable Long menuId) |
| | | { |
| | | return success(menuService.selectMenuById(menuId)); |
| | | SysMenu sysMenu = menuService.selectMenuById(menuId); |
| | | return success(sysMenu); |
| | | } |
| | | |
| | | /** |
| | |
| | | public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId) |
| | | { |
| | | List<SysMenu> menus = menuService.selectMenuList(getUserId()); |
| | | // 添加只看我 |
| | | menuService.addIsRersonal(menus, roleId); |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId)); |
| | | ajax.put("menus", menuService.buildMenuTreeSelect(menus)); |
| | |
| | | } |
| | | return toAjax(menuService.deleteMenuById(menuId)); |
| | | } |
| | | } |
| | | } |