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)
|
||||
}
|
||||
|
||||
/* 计算价格 */
|
||||
|
||||
//阶梯数量切片
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user