public async Task EditOrder(EditOrderDto input)
        {
            var order = await _orderRepository.GetAsync(input.Id);

            if (order == null)
            {
                throw new UserFriendlyException("0001", "未找到订单信息");
            }
            //if (order.State >= OrderType.交易成功)
            //    throw new UserFriendlyException("0002", "已完成或者以失败的订单无法修改");

            ObjectMapper.Map(input, order);
            order.LastModificationTime = DateTime.Now;
            order.LastModifierUserId   = AbpSession.UserId;
            await _orderRepository.UpdateAsync(order);
        }
示例#2
0
 public ActionResult <ApiResult> EditOrder([FromBody] EditOrderDto dto)
 {
     return(editOrder.Execute(dto));
 }