Commit 72fb6e35 authored by clone's avatar clone

1

parent 0944ec41
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\api_broker\service; namespace app\api_broker\service;
use app\extra\RedisExt; use app\extra\RedisExt;
use app\model\BSquare;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
...@@ -43,6 +44,8 @@ class SquareSortService ...@@ -43,6 +44,8 @@ class SquareSortService
$this->redis->zRem(self::SORT_KEY . $site_id, $s_id); $this->redis->zRem(self::SORT_KEY . $site_id, $s_id);
$this->redis->zRem(self::SORT_KEY_CREAM . $site_id, $s_id); $this->redis->zRem(self::SORT_KEY_CREAM . $site_id, $s_id);
if ($look_num > 3) { if ($look_num > 3) {
$m_square = new BSquare();
$m_square->updateStatus(['id'=>$s_id], ['is_cream'=>1]);
$this->redis->zAdd(self::SORT_KEY_CREAM . $site_id, time(), $s_id); $this->redis->zAdd(self::SORT_KEY_CREAM . $site_id, time(), $s_id);
} else { } else {
$this->redis->zAdd(self::SORT_KEY . $site_id, time(), $s_id); $this->redis->zAdd(self::SORT_KEY . $site_id, time(), $s_id);
......
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