修复渤海银行估价失败异常
This commit is contained in:
+8
-2
@@ -462,8 +462,14 @@ public class WeiXinEvaluationController {
|
||||
}else if(bhDists.size()>1){
|
||||
int mod = Integer.MAX_VALUE;
|
||||
for(JSONObject jo : bhDists){
|
||||
double price = Double.valueOf((String)jo.get("price"));
|
||||
int bhprice = (int)price;
|
||||
int bhprice = 0;
|
||||
if (jo.get("price") == null || jo.get("price").equals("null")) {
|
||||
bhprice = 0;
|
||||
} else {
|
||||
double price = Double.valueOf((String)jo.get("price"));
|
||||
bhprice = (int)price;
|
||||
}
|
||||
|
||||
int bhmod = Math.abs(bhprice - avgPrice);
|
||||
if(bhmod<mod){
|
||||
mod = bhmod;
|
||||
|
||||
Reference in New Issue
Block a user