From 5e9c1df5da6ef35f5e10212529e6ab5c2eda108a Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Tue, 10 Oct 2023 17:30: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 | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/service/repositories/order.go b/service/repositories/order.go index 8daaddd3..81adaaba 100644 --- a/service/repositories/order.go +++ b/service/repositories/order.go @@ -1100,14 +1100,11 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe } } // 预计交付时间 - var expectedDeliveryTime = gmodel.ExpectedDelivery{ + var expectedDeliveryTime = &gmodel.ExpectedDelivery{ Current: in.ExpectedDeliveryTime, Initiate: in.ExpectedDeliveryTime, } - // 实际交付时间 - var actualDeliveryTime gmodel.ExpectedDelivery - for _, shoppingCart := range shoppingCartList { // 购物车快照 var shoppingCartSnapshot gmodel.CartSnapshot @@ -1197,8 +1194,7 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe IsHighlyCustomized: *shoppingCart.IsHighlyCustomized, RenderImage: shoppingCartSnapshot.RenderImage, CartId: shoppingCart.Id, - ExpectedDeliveryTime: &expectedDeliveryTime, - ActualDeliveryTime: &actualDeliveryTime, + ExpectedDeliveryTime: expectedDeliveryTime, } orderProductList = append(orderProductList, &productInter) shoppingProductSnapshotList = append(shoppingProductSnapshotList, shoppingCart.ShoppingCartProduct) @@ -1278,8 +1274,7 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe byteShoppingProductSnapshot, _ := json.Marshal(shoppingProductSnapshotList) byteStatusLink, _ := json.Marshal(statusLink) byteOrderMetadata, _ := json.Marshal(gmodel.OrderMetadata{ - ExpectedDeliveryTime: &expectedDeliveryTime, - ActualDeliveryTime: &actualDeliveryTime, + ExpectedDeliveryTime: expectedDeliveryTime, }) // 创建订单