diff --git a/service/repositories/order.go b/service/repositories/order.go index 2d2a6d86..70a5fb4f 100644 --- a/service/repositories/order.go +++ b/service/repositories/order.go @@ -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