public async Task <Result <int> > UpdateMenuAsync([FromBody] AdminMenuUpdateCommand command, CancellationToken cancellationToken = default) { var res = await bus.SendCommand(command, cancellationToken); if (res > 0) { return(RestFull.Success(data: res)); } else { return(RestFull.Fail(data: res)); } }
/// <summary> /// 更新导航信息 /// </summary> /// <param name="command"></param> /// <param name="cancellationToken"></param> /// <returns></returns> public async Task <Result <int> > UpdateMenuAsync(AdminMenuUpdateCommand command, CancellationToken cancellationToken = default) { var res = await adminMenuService.UpdateAsync(command, cancellationToken); if (res > 0) { return(RestFull.Success(data: res)); } else { return(RestFull.Fail(data: res)); } }
public async Task <Result <int> > UpdateMenuAsync([Required][FromBody] AdminMenuUpdateCommand command, CancellationToken cancellationToken = default) { return(await adminAppService.UpdateMenuAsync(command, cancellationToken)); }