Merge branch 'order-processflow-redesign' of https://github.com/dotnet-architecture/eShopOnContainers into order-processflow-redesign
# Conflicts: # src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Order.cs
This commit is contained in:
parent
94ee95f32b
commit
ca56f6378e
@ -73,7 +73,7 @@ namespace Ordering.API.Application.Sagas
|
||||
if (orderSaga.GetOrderStatusId() != OrderStatus.Cancelled.Id
|
||||
|| orderSaga.GetOrderStatusId() != OrderStatus.Shipped.Id)
|
||||
{
|
||||
orderSaga.SetCancelStatus();
|
||||
orderSaga.SetCancelledStatus();
|
||||
result = await SaveChangesAsync();
|
||||
}
|
||||
return result;
|
||||
|
@ -170,36 +170,28 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.O
|
||||
{
|
||||
if (_orderStatusId == OrderStatus.Submited.Id)
|
||||
{
|
||||
_description = "";
|
||||
_description = "The order was cancelled before the grace period was confirm.";
|
||||
}
|
||||
else if (_orderStatusId == OrderStatus.AwaitingValidation.Id)
|
||||
{
|
||||
_description = "";
|
||||
_description = "The order was cancelled before to check the order stock items.";
|
||||
}
|
||||
else if (_orderStatusId == OrderStatus.StockConfirmed.Id)
|
||||
{
|
||||
_description = "";
|
||||
_description = "The order was cancelled before to pay the order.";
|
||||
}
|
||||
else if (_orderStatusId == OrderStatus.Paid.Id)
|
||||
{
|
||||
_description = "";
|
||||
_description = "The order was cancelled before to ship the order.";
|
||||
}
|
||||
else if(_orderStatusId == OrderStatus.Shipped.Id)
|
||||
{
|
||||
throw new OrderingDomainException("Not possible to change order status. Reason: cannot cancel order it is already shipped");
|
||||
throw new OrderingDomainException("Not possible to change order status. Reason: cannot cancel order it is already shipped.");
|
||||
}
|
||||
|
||||
_orderStatusId = OrderStatus.Cancelled.Id;
|
||||
}
|
||||
|
||||
public void SetCancelStatus()
|
||||
{
|
||||
if (_orderStatusId == OrderStatus.Shipped.Id)
|
||||
{
|
||||
throw new OrderingDomainException("Not possible to change order status. Reason: cannot cancel order it is already shipped");
|
||||
}
|
||||
_orderStatusId = OrderStatus.Cancelled.Id;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public int GetOrderStatusId()
|
||||
|
Loading…
x
Reference in New Issue
Block a user