fix:支付

This commit is contained in:
momo
2023-09-22 17:32:23 +08:00
parent b398da58e1
commit 656d5038fe
3 changed files with 20 additions and 3 deletions

View File

@@ -863,7 +863,10 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
OriginalCurrency: in.OriginalCurrency,
}),
ExpectedDeliveryTime: &in.ExpectedDeliveryTime,
PurchaseQuantity: *shoppingCart.PurchaseQuantity,
PurchaseQuantity: gmodel.PurchaseQuantity{
Current: *shoppingCart.PurchaseQuantity,
Initiate: *shoppingCart.PurchaseQuantity,
},
ProductID: *shoppingCart.ProductId,
ProductCover: *shoppingCart.ShoppingCartProduct.Cover,
ProductCoverMetadata: productCoverMetadata,
@@ -1032,7 +1035,8 @@ func (d *defaultOrder) OrderDetailHandler(ctx context.Context, orderInfo *gmodel
if original == 1 {
for orderProductKey, orderProduct := range orderDetail.OrderProduct {
orderDetail.OrderProduct[orderProductKey].TotalPrice = order.GetAmountInfoFormat(&orderProduct.TotalPrice)
orderDetail.OrderProduct[orderProductKey].ItemPrice = order.GetAmountInfoFormat(&orderProduct.ItemPrice)
orderDetail.OrderProduct[orderProductKey].TotalPrice = order.GetAmountInfoFormat(&orderProduct.TotalPrice)
orderDetail.OrderProduct[orderProductKey].PurchaseQuantity = order.GetPurchaseQuantity(&orderProduct.PurchaseQuantity)
orderDetail.OrderProduct[orderProductKey].ShoppingCartSnapshot = nil
orderDetail.OrderProduct[orderProductKey].ProductSnapshot = nil
}