Commit 8cd511c7 authored by shajiaiming's avatar shajiaiming

逻辑调整

parent 014c24e6
......@@ -36,7 +36,7 @@ class BinanceBuilder extends FactoryService
$temp['high'] = (float)sprintf("%0.4f", $val['highPrice']);
$temp['low'] = (float)sprintf("%0.4f", $val['lowPrice']);
$temp['vol'] = (float)sprintf("%0.4f", $val['volume']);
if (\Yii::$app->redis_app->sismember($device_code . '_binance', $val['symbol'])) {
if (false != $device_code && \Yii::$app->redis_app->sismember($device_code . '_binance', $val['symbol'])) {
$temp['optional'] = true;
} else {
$temp['optional'] = false;
......
......@@ -36,7 +36,7 @@ class HuobiBuilder extends FactoryService
$temp['high'] = (float)sprintf("%0.4f", $val['high']);
$temp['low'] = (float)sprintf("%0.4f", $val['low']);
$temp['vol'] = (float)sprintf("%0.4f", $val['vol']);
if (\Yii::$app->redis_app->sismember($device_code . '_huobi', $val['symbol'])) {
if (false != $device_code && \Yii::$app->redis_app->sismember($device_code . '_huobi', $val['symbol'])) {
$temp['optional'] = true;
} else {
$temp['optional'] = false;
......
......@@ -40,7 +40,7 @@ class ZhaobiBuilder extends FactoryService
$temp['high'] = (float)sprintf("%0.4f", $val['high']);
$temp['low'] = (float)sprintf("%0.4f", $val['low']);
$temp['vol'] = (float)sprintf("%0.4f", $val['vol']);
if (\Yii::$app->redis_app->sismember($device_code . '_zhaobi', $val['symbol'])) {
if (false != $device_code && \Yii::$app->redis_app->sismember($device_code . '_zhaobi', $val['symbol'])) {
$temp['optional'] = true;
} else {
$temp['optional'] = false;
......
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