public async Task <BaseApiResponse> AgreeRefund(StoreOrderOpRequest request) { request.CheckNotNull(nameof(request)); var command = new AgreeRefundCommand() { AggregateRootId = request.Id }; var result = await ExecuteCommandAsync(command); if (!result.IsSuccess()) { return(new BaseApiResponse { Code = 400, Message = "命令没有执行成功:{0}".FormatWith(result.GetErrorMessage()) }); } return(new BaseApiResponse()); }
public void Handle(ICommandContext context, AgreeRefundCommand command) { context.Get <StoreOrder>(command.AggregateRootId).AgreeRefund(); }
public void Handle(ICommandContext context, AgreeRefundCommand command) { context.Get <OrderGoods>(command.AggregateRootId).AgreeRefund(command.ServiceNumber); }