Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
momo 2023-10-07 13:33:51 +08:00
commit fcb3dd13c6

View File

@ -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)