zhuo
2025-02-26 3dbbf41e66f433784cda81b56b8b97917f284ff5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
@@ -1,6 +1,8 @@
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;
@@ -23,7 +25,7 @@
/**
 * 菜单信息
 *
 *
 * @author ruoyi
 */
@RestController
@@ -51,7 +53,8 @@
    @GetMapping(value = "/{menuId}")
    public AjaxResult getInfo(@PathVariable Long menuId)
    {
        return success(menuService.selectMenuById(menuId));
        SysMenu sysMenu = menuService.selectMenuById(menuId);
        return success(sysMenu);
    }
    /**
@@ -71,6 +74,8 @@
    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));
@@ -139,4 +144,4 @@
        }
        return toAjax(menuService.deleteMenuById(menuId));
    }
}
}