fix:购物车下单
This commit is contained in:
parent
c004b927ad
commit
8768588a8f
|
@ -206,6 +206,8 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
|
||||||
json.Unmarshal([]byte(*shoppingCartProductPrice.StepPrice), &stepPrice)
|
json.Unmarshal([]byte(*shoppingCartProductPrice.StepPrice), &stepPrice)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 计算价格 */
|
||||||
|
|
||||||
//阶梯数量切片
|
//阶梯数量切片
|
||||||
stepNum, err := format.StrSlicToIntSlice(strings.Split(*shoppingCartProductPrice.StepNum, ","))
|
stepNum, err := format.StrSlicToIntSlice(strings.Split(*shoppingCartProductPrice.StepNum, ","))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -242,6 +244,8 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
|
||||||
// 单个购物车总价(厘)
|
// 单个购物车总价(厘)
|
||||||
productTotalPrice := productPrice * reqPurchaseQuantity
|
productTotalPrice := productPrice * reqPurchaseQuantity
|
||||||
|
|
||||||
|
/* 计算价格 */
|
||||||
|
|
||||||
// 订单商品总价(厘)
|
// 订单商品总价(厘)
|
||||||
orderProductTotal = orderProductTotal + productTotalPrice
|
orderProductTotal = orderProductTotal + productTotalPrice
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user