Commit 99457224 authored by shajiaiming's avatar shajiaiming

test

parent 8b96e71c
...@@ -61,20 +61,25 @@ class HuobiBuilder extends FactoryService ...@@ -61,20 +61,25 @@ class HuobiBuilder extends FactoryService
} }
if (false != $condition) { if (false != $condition) {
if ('price' == $condition['data_value']) { if ('price' == $condition['data_value']) {
$keys = $this->redis->lrange($this->supported_symbol_close_sort, $this->start, $this->end); $keys = $this->redis_ticker->lrange($this->supported_symbol_close_sort, $this->start, $this->end);
} }
if ('sort' == $condition['data_value']) { if ('change' == $condition['data_value']) {
$keys = $this->redis->lrange($this->supported_symbol_change_sort, $this->start, $this->end); $keys = $this->redis_ticker->lrange($this->supported_symbol_change_sort, $this->start, $this->end);
} }
} else { } else {
$keys = $this->redis->lrange($this->supported_symbol_list, $this->start, $this->end); $keys = $this->redis->lrange($this->supported_symbol_list, $this->start, $this->end);
} }
$ticker = []; $ticker = [];
foreach ($keys as $val) { foreach ($keys as $val) {
foreach ($this->basic_coin as $k => $coin) { foreach ($this->basic_coin as $k => $coin) {
$explode_arr = explode(strtolower($coin), $val); $explode_arr = explode(strtoupper($coin), $val);
if (2 == count($explode_arr) && empty($explode_arr[1])) { if (2 == count($explode_arr) && empty($explode_arr[1])) {
list($low, $high, $close, $open, $vol) = $this->redis->hmget($this->quotation_prefix . strtolower($val), 'low', 'high', 'last', 'open', 'vol'); if (false != $condition) {
list($low, $high, $close, $open, $vol) = $this->redis_ticker->hmget($this->quotation_prefix . strtoupper($val), 'low', 'high', 'last', 'open', 'vol');
} else {
list($low, $high, $close, $open, $vol) = $this->redis->hmget($this->quotation_prefix . strtolower($val), 'low', 'high', 'last', 'open', 'vol');
}
$temp = []; $temp = [];
$temp['symbol'] = strtoupper($explode_arr[0]) . '/' . $coin; $temp['symbol'] = strtoupper($explode_arr[0]) . '/' . $coin;
$temp['currency'] = strtoupper($explode_arr[0]); $temp['currency'] = strtoupper($explode_arr[0]);
......
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