fix:购物车下单

This commit is contained in:
momo 2023-09-20 11:57:08 +08:00
parent c004b927ad
commit 8768588a8f

View File

@ -206,6 +206,8 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
json.Unmarshal([]byte(*shoppingCartProductPrice.StepPrice), &stepPrice)
}
/* 计算价格 */
//阶梯数量切片
stepNum, err := format.StrSlicToIntSlice(strings.Split(*shoppingCartProductPrice.StepNum, ","))
if err != nil {
@ -242,6 +244,8 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
// 单个购物车总价(厘)
productTotalPrice := productPrice * reqPurchaseQuantity
/* 计算价格 */
// 订单商品总价(厘)
orderProductTotal = orderProductTotal + productTotalPrice