From a10d41405ba38a27d65bf7ca6e24dc2c55ac9340 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Sat, 7 Oct 2023 12:06:21 +0800 Subject: [PATCH] fix --- server/product/internal/logic/getproductsteppricelogic.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/product/internal/logic/getproductsteppricelogic.go b/server/product/internal/logic/getproductsteppricelogic.go index 60527bcf..8db90850 100644 --- a/server/product/internal/logic/getproductsteppricelogic.go +++ b/server/product/internal/logic/getproductsteppricelogic.go @@ -131,7 +131,7 @@ func (l *GetProductStepPriceLogic) GetProductStepPrice(req *types.GetProductStep }) } //计算起购数量的单价 - _, minBuyUnitsQuantityPrice, err := l.svcCtx.Repositories.NewShoppingCart.CaculateStepPrice(stepPrice.MinBuyUnitsNum, stepPrice, fittingPrice) + _, itemPrice, err := l.svcCtx.Repositories.NewShoppingCart.CaculateStepPrice(stepPrice.MinBuyUnitsNum, stepPrice, fittingPrice) if err != nil { return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to get min buy quantity item price") } @@ -142,8 +142,8 @@ func (l *GetProductStepPriceLogic) GetProductStepPrice(req *types.GetProductStep "max_price": maxPrice, "step_range": stepRange, "min_buy_units_quantity": stepPrice.MinBuyUnitsNum, - "min_buy_units_quantity_total_price": format.CentitoDollarWithNoHalfAdjust(minBuyUnitsQuantityPrice*stepPrice.MinBuyUnitsNum, 2), - "min_buy_units_quantity_item_price": format.CentitoDollar(minBuyUnitsQuantityPrice, 3), + "min_buy_units_quantity_total_price": format.CentitoDollarWithNoHalfAdjust(itemPrice*stepPrice.MinBuyUnitsNum, 2), + "min_buy_units_quantity_item_price": format.CentitoDollar(itemPrice, 3), } } return resp.SetStatusWithMessage(basic.CodeOK, "success", mapRsp)