Commit 1a24e722 authored by shajiaiming's avatar shajiaiming

fix

parent 7f5e535c
......@@ -197,18 +197,18 @@ class TickerController extends BaseController
}
if (!empty($condition)) {
if ('price' == $condition['data_value']) {
if ('price-asc' == $condition['sort_value']) {
if ('price_asc' == $condition['sort_value']) {
$ticker = Tools::arraySort($ticker, 'close', SORT_ASC);
}
if ('price-desc' == $condition['sort_value']) {
if ('price_desc' == $condition['sort_value']) {
$ticker = Tools::arraySort($ticker, 'close', SORT_DESC);
}
}
if ('change' == $condition['data_value']) {
if ('change-asc' == $condition['sort_value']) {
if ('change_asc' == $condition['sort_value']) {
$ticker = Tools::arraySort($ticker, 'change', SORT_ASC);
}
if ('change-desc' == $condition['sort_value']) {
if ('change_desc' == $condition['sort_value']) {
$ticker = Tools::arraySort($ticker, 'change', SORT_DESC);
}
}
......
......@@ -44,18 +44,18 @@ class BinanceBuilder extends FactoryService
}
if (false != $condition) {
if ('price' == $condition['data_value']) {
if ('price-asc' == $condition['sort_value']) {
if ('price_asc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_close_asc, $this->start, $this->end);
}
if ('price-desc' == $condition['sort_value']) {
if ('price_desc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_close_desc, $this->start, $this->end);
}
}
if ('change' == $condition['data_value']) {
if ('change-asc' == $condition['sort_value']) {
if ('change_asc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_change_asc, $this->start, $this->end);
}
if ('change-desc' == $condition['sort_value']) {
if ('change_desc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_change_desc, $this->start, $this->end);
}
}
......
......@@ -64,18 +64,18 @@ class HuobiBuilder extends FactoryService
}
if (false != $condition) {
if ('price' == $condition['data_value']) {
if ('price-asc' == $condition['sort_value']) {
if ('price_asc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_close_asc, $this->start, $this->end);
}
if ('price-desc' == $condition['sort_value']) {
if ('price_desc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_close_desc, $this->start, $this->end);
}
}
if ('change' == $condition['data_value']) {
if ('change-asc' == $condition['sort_value']) {
if ('change_asc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_change_asc, $this->start, $this->end);
}
if ('change-desc' == $condition['sort_value']) {
if ('change_desc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_change_desc, $this->start, $this->end);
}
}
......
......@@ -28,18 +28,18 @@ class ZhaobiBuilder extends FactoryService
$this->end = 50;
if (false != $condition) {
if ('price' == $condition['data_value']) {
if ('price-asc' == $condition['sort_value']) {
if ('price_asc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_close_asc, $this->start, $this->end);
}
if ('price-desc' == $condition['sort_value']) {
if ('price_desc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_close_desc, $this->start, $this->end);
}
}
if ('change' == $condition['data_value']) {
if ('change-asc' == $condition['sort_value']) {
if ('change_asc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_change_asc, $this->start, $this->end);
}
if ('change-desc' == $condition['sort_value']) {
if ('change_desc' == $condition['sort_value']) {
$keys = $this->redis_ticker->lrange($this->supported_symbol_change_desc, $this->start, $this->end);
}
}
......
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