Commit fb04d92e authored by shajiaiming's avatar shajiaiming

debug

parent 69d2c678
...@@ -216,8 +216,7 @@ class ExchangeBusiness ...@@ -216,8 +216,7 @@ class ExchangeBusiness
$quotation = self::getquatation($row['name']); $quotation = self::getquatation($row['name']);
if (!$quotation) { if (!$quotation) {
$quotation = []; $quotation = [];
//使用Coin服务 if(in_array($row['name'], ['BTY', 'YCC'])){
try {
$coinServer = CoinFactory::createCoin($row['name'], $row['id'], $row['sid']); $coinServer = CoinFactory::createCoin($row['name'], $row['id'], $row['sid']);
$rows[$key]['sid'] = ucfirst($rows[$key]['sid']); $rows[$key]['sid'] = ucfirst($rows[$key]['sid']);
$rows[$key]['rmb'] = $coinServer->getPrice(); $rows[$key]['rmb'] = $coinServer->getPrice();
...@@ -225,12 +224,11 @@ class ExchangeBusiness ...@@ -225,12 +224,11 @@ class ExchangeBusiness
$rows[$key]['low'] = $coinServer->getLow(); $rows[$key]['low'] = $coinServer->getLow();
$rows[$key]['high'] = $coinServer->getHigh(); $rows[$key]['high'] = $coinServer->getHigh();
$coinServer->__destruct(); $coinServer->__destruct();
} catch (\Exception $exception) { } else {
$rows[$key]['rmb'] = 0; $rows[$key]['rmb'] = 0;
$rows[$key]['last'] = 0; $rows[$key]['last'] = 0;
$rows[$key]['low'] = 0; $rows[$key]['low'] = 0;
$rows[$key]['high'] = 0; $rows[$key]['high'] = 0;
\Yii::error($exception->getMessage());
} }
} }
if (strtoupper($row['platform']) == 'GUODUN') { if (strtoupper($row['platform']) == 'GUODUN') {
......
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