redis 加目录
This commit is contained in:
@@ -403,7 +403,7 @@ class Base extends Model
|
|||||||
public static function saveonlinelist(array $client_id_list)
|
public static function saveonlinelist(array $client_id_list)
|
||||||
{
|
{
|
||||||
if(is_array($client_id_list)) {
|
if(is_array($client_id_list)) {
|
||||||
$redis_name = date('Y-m-d') . '_online_number';
|
$redis_name = 'online:' . date('Y-m-d') . '_online_number';
|
||||||
$result = Redis::get($redis_name);
|
$result = Redis::get($redis_name);
|
||||||
if($result) {
|
if($result) {
|
||||||
$result = json_decode($result, true);
|
$result = json_decode($result, true);
|
||||||
@@ -862,7 +862,7 @@ class Base extends Model
|
|||||||
*/
|
*/
|
||||||
public static function add_total_number(string $client_id, string $type = null, $total = null)
|
public static function add_total_number(string $client_id, string $type = null, $total = null)
|
||||||
{
|
{
|
||||||
$redis_name = date('Y-m-d') . '_online_number';
|
$redis_name = 'online:' . date('Y-m-d') . '_online_number';
|
||||||
$result = Redis::get($redis_name);
|
$result = Redis::get($redis_name);
|
||||||
if($result) {
|
if($result) {
|
||||||
$result_arr = json_decode($result, true);
|
$result_arr = json_decode($result, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user