Commit 96869c96 authored by clone's avatar clone

1

parent d8509f72
...@@ -155,7 +155,7 @@ class SquareSortService ...@@ -155,7 +155,7 @@ class SquareSortService
$cream_list = $this->redis->zRange(self::SORT_KEY_CREAM . $site_id, 0, $residue, true); $cream_list = $this->redis->zRange(self::SORT_KEY_CREAM . $site_id, 0, $residue, true);
$list = $this->redis->zRange(self::SORT_KEY . $site_id, $index_start, $index_end, true); $list = $this->redis->zRange(self::SORT_KEY . $site_id, $index_start, $index_end, true);
$result = $cream_list + $list; $result = $cream_list + $list;
} elseif ($index_min > $cream_num) { } elseif ($index_min > $cream_num && $index_min < $total) {
$index_end = $num - 1 - ($index_min - $cream_num); $index_end = $num - 1 - ($index_min - $cream_num);
$index_start = $index_end - $page_size; $index_start = $index_end - $page_size;
$index_start = $index_start > 0 ? $index_start : 0; $index_start = $index_start > 0 ? $index_start : 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