Commit a8e0a668 by huangchengyi

更新梯度比价

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