Commit e03eaab6 authored by shajiaiming's avatar shajiaiming

debug

parent e42f9351
...@@ -68,10 +68,9 @@ class ExchangeBusiness ...@@ -68,10 +68,9 @@ class ExchangeBusiness
if('GM' == $tag || 'BSTC' == $tag){ if('GM' == $tag || 'BSTC' == $tag){
$quotation = $exchange->getTickerToken7($tag, 'HA'); $quotation = $exchange->getTickerToken7($tag, 'HA');
$f = true; $f = true;
break; continue;
} }
$exchange = ExchangeFactory::createExchange($exchange);
if ($exchange->symbolExists($tag)) { if ($exchange->symbolExists($tag)) {
$quotation = $exchange->getTicker($tag); $quotation = $exchange->getTicker($tag);
$f = true; $f = true;
...@@ -110,10 +109,15 @@ class ExchangeBusiness ...@@ -110,10 +109,15 @@ class ExchangeBusiness
/** /**
* @var $exchange \common\service\exchange\Exchange * @var $exchange \common\service\exchange\Exchange
*/ */
$exchange = ExchangeFactory::createExchange("Bty"); if('GM' == $tag || 'BSTC' == $tag){
$rate = $exchange->getTicker("BTY", "USDT"); $quotation['rmb'] = (float)sprintf("%0.2f", $quotation['last']);
$rate = (float)$rate['rmb'] / $rate['last']; }else{
$quotation['rmb'] = (float)sprintf("%0.2f", $rate * $quotation['last']); $exchange = ExchangeFactory::createExchange("Bty");
$rate = $exchange->getTicker("BTY", "USDT");
$rate = (float)$rate['rmb'] / $rate['last'];
$quotation['rmb'] = (float)sprintf("%0.2f", $rate * $quotation['last']);
}
return $quotation; return $quotation;
} }
......
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