完善菜单接口
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user