Commit 50adaeee by mushishixian

起订量小于50的排序问题

parent 6e11526b
Showing with 4 additions and 0 deletions
......@@ -7,6 +7,7 @@ import (
"go_sku_server/model"
c "go_sku_server/pkg/common"
"go_sku_server/pkg/gredis"
"sort"
"strconv"
)
......@@ -86,6 +87,9 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) (generatedLadderPri
PriceUs: c.MyRound(c.MulFloat(costPriceUs, ratio), 4),
})
}
sort.Slice(generatedLadderPrice, func(i, j int) bool {
return generatedLadderPrice[i].Purchases < generatedLadderPrice[j].Purchases
})
return generatedLadderPrice
}
//判断最小起订量是属于哪个范围
......
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