Commit eb0f7d01 authored by rlgy's avatar rlgy

update

parent 38cd98f1
......@@ -9,8 +9,8 @@
namespace common\business;
use common\models\psources\Coin;
use common\service\exchange\ExchangeFactory;
use common\service\coin\CoinFactory;
use common\service\exchange\ExchangeFactory;
/**
* Class ExchangeBusiness
......@@ -78,9 +78,9 @@ class ExchangeBusiness
}
//格式化行情数据
foreach ($quotation as $key => $item) {
$quotation[$key] = (float)sprintf("%0.4f", (double)$item);
$quotation[$key] = (float) sprintf("%0.4f", (double) $item);
}
$quotation['rmb'] = (float)sprintf("%0.2f", 6.6 * $quotation['last']);
$quotation['rmb'] = (float) sprintf("%0.2f", 6.6 * $quotation['last']);
return $quotation;
}
......@@ -151,8 +151,15 @@ class ExchangeBusiness
\Yii::error($exception->getMessage());
}
}
if (strtoupper($row['platform']) == 'GUODUN') {
$rows[$key]['rmb'] = 0;
$rows[$key]['last'] = 0;
$rows[$key]['low'] = 0;
$rows[$key]['high'] = 0;
} else {
$rows[$key] = array_merge($rows[$key], $quotation);
}
}
return ['code' => 0, 'count' => $count, 'data' => $rows];
}
return [];
......
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 to comment