完善菜单接口

This commit is contained in:
yeslode
2021-10-17 23:17:07 +08:00
parent 32a9c89d6a
commit 73525db2e9
7 changed files with 16 additions and 12 deletions

View File

@@ -26,7 +26,9 @@ namespace Yi.Framework.ApiMicroservice.Controllers
[HttpGet]
public async Task<Result> GetMenu()
{
return Result.Success().SetData(await _menuService.GetTopMenu());
//var top =await _menuService.GetTopMenu();
//var children=await _menuService.get
return Result.Success().SetData(await _menuService.GetTopMenu());
}
/// <summary>

View File

@@ -71,10 +71,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
[HttpPost]
public async Task<Result> SetMenuByRole(IdsListDto<int> idsListDto)
{
foreach(var id in idsListDto.ids1)
{
await _roleService.SetMenusByRolesId(idsListDto.ids2, id);
}
await _roleService.SetMenusByRolesId(idsListDto.ids2, idsListDto.ids1);
return Result.Success();
}
}