Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 2
0
        /// <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));
            }
        }
Ejemplo n.º 3
0
 public async Task <Result <int> > UpdateMenuAsync([Required][FromBody] AdminMenuUpdateCommand command, CancellationToken cancellationToken = default)
 {
     return(await adminAppService.UpdateMenuAsync(command, cancellationToken));
 }