Commit 2fb6ab8e by mushishixian

固定系数排序问题

parent 6a1c7316
Showing with 3 additions and 0 deletions
...@@ -91,6 +91,9 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) (generatedLadderPri ...@@ -91,6 +91,9 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) (generatedLadderPri
PriceUs: c.MyRound(c.MulFloat(costPriceUs, ratio), 4), PriceUs: c.MyRound(c.MulFloat(costPriceUs, ratio), 4),
}) })
} }
sort.Slice(showPriceRatio, func(i, j int) bool {
return showPriceRatio[i].Ratio > showPriceRatio[j].Ratio
})
sku.PriceRatio = showPriceRatio sku.PriceRatio = showPriceRatio
sort.Slice(generatedLadderPrice, func(i, j int) bool { sort.Slice(generatedLadderPrice, func(i, j int) bool {
......
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