Commit a8e0a668 by huangchengyi

更新梯度比价

parent 6b8136c7
Showing with 2 additions and 1 deletions
...@@ -102,12 +102,13 @@ func (qs *ParityService) GetParity(ctx *gin.Context) (results model.LyResponse) ...@@ -102,12 +102,13 @@ func (qs *ParityService) GetParity(ctx *gin.Context) (results model.LyResponse)
//比价数量对应的梯度数量 //比价数量对应的梯度数量
var tprice float64 = 0; //对应梯度价 var tprice float64 = 0; //对应梯度价
for _,p := range v.LadderPrice { for _,p := range v.LadderPrice {
if p.Purchases >= gconv.Int(number) { if gconv.Int(number) >= p.Purchases { //购买数量大于梯度数量
if deliver == "1" { //大陆 if deliver == "1" { //大陆
tprice = p.PriceCn tprice = p.PriceCn
}else{ //香港 }else{ //香港
tprice = p.PriceUs tprice = p.PriceUs
} }
}else{
break; break;
} }
} }
......
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