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)