From a8df57808f55748d4d08186de87ab67e0861654e Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Wed, 11 Oct 2023 10:14:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=AE=97=E6=B3=95=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/repositories/order.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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,