diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs
index 8d464936..c377a2f7 100644
--- a/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs
+++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs
@@ -25,11 +25,13 @@ namespace Yi.Framework.ApiMicroservice.Controllers
_menuService = menuService;
_userService =userService;
}
+ ///
+ /// 这个是要递归的,但是要过滤掉删除的,所以,可以写一个通用过滤掉删除的方法
+ ///
+ ///
[HttpGet]
- public async Task GetMenu()
- {
-
- return Result.Success().SetData(await _menuService.GetTopMenu());
+ public async Task GetMenuInMould()
+ {
}
///
@@ -59,44 +61,26 @@ namespace Yi.Framework.ApiMicroservice.Controllers
///
/// 增
+ /// 现在,top菜单只允许为一个
///
///
///
[HttpPost]
- public async Task AddMenu(menu _menu)
+ public async Task AddTopMenu(menu _menu)
{
- _menu.is_top = (short)Common.Enum.TopFlagEnum.Top;
- await _menuService.AddAsync(_menu);
- return Result.Success();
}
///
/// 给一个菜单设置一个接口,Id1为菜单id,Id2为接口id
+ /// 用于给菜单设置接口
///
///
///
[HttpPost]
public async Task SetMouldByMenu(IdDto idDto)
{
- if (await _menuService.SetMouldByMenu(idDto.id2,idDto.id1))
- {
- return Result.Success();
- }
- return Result.Error();
}
- ///
- /// 得到该用户有哪些菜单,关联mould
- ///
- ///
- [HttpGet]
- public async Task GetMenuByUser()
- {
- var _user = this.HttpContext.GetCurrentUserInfo();
- var menuList= await _userService.GetMenusByUser(_user);
- return Result.Success().SetData(menuList);
-
- }
///
/// 给一个菜单添加子节点(注意:添加,不是覆盖)
@@ -106,19 +90,16 @@ namespace Yi.Framework.ApiMicroservice.Controllers
[HttpPost]
public async Task AddChildrenMenu(ChildrenDto