diff --git a/src/CMSMicroservice.Application/DiscountShopCQ/Commands/CompleteOrderPayment/CompleteOrderPaymentCommandHandler.cs b/src/CMSMicroservice.Application/DiscountShopCQ/Commands/CompleteOrderPayment/CompleteOrderPaymentCommandHandler.cs index 182112e..0216a08 100644 --- a/src/CMSMicroservice.Application/DiscountShopCQ/Commands/CompleteOrderPayment/CompleteOrderPaymentCommandHandler.cs +++ b/src/CMSMicroservice.Application/DiscountShopCQ/Commands/CompleteOrderPayment/CompleteOrderPaymentCommandHandler.cs @@ -105,6 +105,7 @@ public class CompleteOrderPaymentCommandHandler : IRequestHandler CMSMicroservice.Protobuf.Protos.DiscountOrder.PaymentStatus.PaymentPending, _ => CMSMicroservice.Protobuf.Protos.DiscountOrder.PaymentStatus.PaymentPending }; + + private static DeliveryStatus MapDeliveryStatus(DomainEnums.DeliveryStatus status) => status switch + { + DomainEnums.DeliveryStatus.None => DeliveryStatus.DeliveryPending, + DomainEnums.DeliveryStatus.Pending => DeliveryStatus.DeliveryProcessing, + DomainEnums.DeliveryStatus.InTransit => DeliveryStatus.DeliveryShipped, + DomainEnums.DeliveryStatus.Delivered => DeliveryStatus.DeliveryDelivered, + DomainEnums.DeliveryStatus.Returned => DeliveryStatus.DeliveryCancelled, + DomainEnums.DeliveryStatus.Cancelled => DeliveryStatus.DeliveryCancelled, + _ => DeliveryStatus.DeliveryPending + }; }