Commit 4a0ed2f3 authored by shajiaiming's avatar shajiaiming

fix

parent edae5b99
......@@ -357,9 +357,13 @@ class TickerController extends BaseController
$msg = '请求参数错误!';
goto doEnd;
}
$currency = CoinSupportedCurrency::find()->where(['platform_id' => $platform_id])->all();
$currency = CoinSupportedCurrency::find()->where(['platform_id' => $platform_id])->orderBy('sort')->all();
foreach ($currency as $val) {
list($rate) = Yii::$app->redis_currency->hmget('quotation_boc_' . 'CNY_' . $val->currency->symbol, 'last');
if (1111 == $val->currency->pj_id) {
$rate = (string)1;
} else {
list($rate) = Yii::$app->redis_currency->hmget('quotation_boc_' . 'CNY_' . $val->currency->symbol, 'last');
}
$val->pj_id = $val->currency->pj_id;
$val->pj_name = $val->currency->pj_name;
$val->pj_symbol = $val->currency->pj_symbol;
......
......@@ -38,6 +38,7 @@ class TickerController extends Controller
$currency_model = CoinSupportedCurrency::find()->groupBy('currency_id')->all();
$curl = new Curl();
foreach ($currency_model as $val) {
if (1111 == $val->currency->pj_id) continue;
go(function () use ($val, $curl) {
\Co::sleep(0.5);
$response = $curl->setPostParams([
......
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