Commit 91d78a1e by 杨树贤

Merge branch 'ysx-价格体系修改-20230815' into dev

parents 4a12e44f ed01d0ca
Showing with 3 additions and 4 deletions
...@@ -360,14 +360,14 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) model.LySku { ...@@ -360,14 +360,14 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) model.LySku {
} }
//fmt.Println(costMapIndex) //fmt.Println(costMapIndex)
priceRatio := priceRatioList[costMapIndex] priceRatio := priceRatioList[costMapIndex]
fmt.Println("获取到的阶梯系数为 : ", priceRatio)
priceCnRatio := priceRatio.Ratio priceCnRatio := priceRatio.Ratio
priceUsRatio := priceRatio.RatioUsd priceUsRatio := priceRatio.RatioUsd
// 阶梯价格系数正序取 // 阶梯价格系数正序取
fmt.Println("价格:",c.MulFloat(ladder.PriceCn, priceCnRatio))
generatedLadderPrice = append(generatedLadderPrice, model.LadderPrice{ generatedLadderPrice = append(generatedLadderPrice, model.LadderPrice{
Purchases: ladder.Purchases, Purchases: ladder.Purchases,
PriceCn: c.MyRound(c.MulFloat(ladder.PriceCn, priceCnRatio), 4), PriceCn: c.MyRound(c.MulFloat(ladder.PriceCn, priceCnRatio), 5),
PriceUs: c.MyRound(c.MulFloat(ladder.PriceUs, priceUsRatio), 4), PriceUs: c.MyRound(c.MulFloat(ladder.PriceUs, priceUsRatio), 5),
}) })
showPriceRatioList = append(showPriceRatioList, model.PriceRatio{ showPriceRatioList = append(showPriceRatioList, model.PriceRatio{
Ratio: priceCnRatio, Ratio: priceCnRatio,
...@@ -375,7 +375,6 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) model.LySku { ...@@ -375,7 +375,6 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) model.LySku {
Purchases: int64(ladder.Purchases), Purchases: int64(ladder.Purchases),
}) })
} }
} else { } else {
//价格阶梯数量超过最利润点的层级的情况 //价格阶梯数量超过最利润点的层级的情况
for i := 0; i < 9; i++ { for i := 0; i < 9; i++ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment