From 8768588a8fa9de33f080bbdb4c70227e50f697e9 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Wed, 20 Sep 2023 11:57:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B4=AD=E7=89=A9=E8=BD=A6=E4=B8=8B?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/repositories/order.go | 4 ++++ 1 file changed, 4 insertions(+) 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