更新菜单Top

This commit is contained in:
lzw
2021-10-16 23:17:32 +08:00
parent b77b91912b
commit cdd9e8f45b
5 changed files with 46 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
[HttpGet]
public async Task<Result> GetMenu()
{
return Result.Success().SetData(await _menuService.GetMenuMouldByMenu( new menu()));
return Result.Success().SetData(await _menuService.GetTopMenu());
}
/// <summary>
@@ -62,6 +62,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
[HttpPost]
public async Task<Result> AddMenu(menu _menu)
{
_menu.is_top = (short)Common.Enum.TopFlagEnum.Top;
await _menuService.AddAsync(_menu);
return Result.Success();
}