fix:算法请求调整

This commit is contained in:
momo 2023-10-10 17:30:31 +08:00
parent ba40f63b42
commit 5e9c1df5da

View File

@ -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,
})
// 创建订单