修改控制器

This commit is contained in:
lzw
2021-10-16 17:50:55 +08:00
parent 6a492168ed
commit 0860e05d17
9 changed files with 18 additions and 21 deletions

View File

@@ -26,7 +26,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
[HttpGet]
public async Task<Result> GetMenu()
{
return Result.Success().SetData(await _menuService.GetAllEntitiesTrueAsync());
return Result.Success().SetData(await _menuService.GetMenuMouldByMenu( new menu()));
}
/// <summary>
@@ -101,8 +101,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
[HttpPost]
public async Task<Result> AddChildrenMenu(ChildrenDto<menu> childrenDto)
{
//var _menu = await _menuService.GetEntityById(childrenDto.parentId);
var _children= await _menuService.AddChildrenMenu(childrenDto.parentId,childrenDto.data);
var _children= await _menuService.AddChildrenMenu(new menu() { id=childrenDto.parentId}, childrenDto.data);
return Result.Success();
}