12345678910111213141516171819202122232425262728293031323334353637 |
- // <author></author>
- // <date></date>
- // <description></description>
- using ERP.Core.Interface;
- using ERP.Framework.Security;
- using ERP.Framework.WebApi;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.Extensions.Configuration;
- namespace ERP.Core.Controllers
- {
- [Route("system/menu")]
- public class SysMenuController : BaseController
- {
- private readonly IConfiguration _configuration;
- private readonly ISysMenuService _sysMenuService;
- public SysMenuController(IConfiguration configuration, ISysMenuService sysMenuService)
- {
- _configuration = configuration;
- _sysMenuService = sysMenuService;
- }
- [HttpGet("get-routers")]
- public IActionResult GetRouter()
- {
- var userId = LoginHelper.GetUserId();
- var menuList = _sysMenuService.SelectMenuTreeByUserId(userId);
- var result = _sysMenuService.BuildMenuTree(menuList, string.Empty);
- return Success(result);
- }
- }
- }
|