diff --git a/service/repositories/order.go b/service/repositories/order.go index 81adaaba..73723be1 100644 --- a/service/repositories/order.go +++ b/service/repositories/order.go @@ -1526,6 +1526,12 @@ func (d *defaultOrder) OrderDetailHandler(ctx context.Context, orderInfo *gmodel } } + var expectedDeliveryTime time.Time + if productValue.ExpectedDeliveryTime == nil { + expectedDeliveryTime = expectedTime + } else { + expectedDeliveryTime = productValue.ExpectedDeliveryTime.Current + } orderProductItem := gmodel.OrderProduct{ TotalPrice: order.GetAmountInfoFormat(&productValue.TotalPrice), @@ -1537,7 +1543,7 @@ func (d *defaultOrder) OrderDetailHandler(ctx context.Context, orderInfo *gmodel ProductCover: productValue.ProductCover, ProductCoverMetadata: productValue.ProductCoverMetadata, ShoppingCartSnapshot: &shoppingCartSnapshotData, - ExpectedDeliveryTime: &productValue.ExpectedDeliveryTime.Current, + ExpectedDeliveryTime: &expectedDeliveryTime, PurchaseQuantity: *productValue.PurchaseQuantity, DiyInformation: productValue.DiyInformation,