浏览代码

测试redis

lizhen_gitee 1 年之前
父节点
当前提交
b439004e1b
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      application/api/controller/Party.php

+ 14 - 0
application/api/controller/Party.php

@@ -92,6 +92,20 @@ class Party extends Common
         //party_lineup
     }
 
+    public function test(){
+        $party_id = '231346001739777';
+        $user_ids = $this->redis->hGetAll("online_".$party_id);
+        dump($user_ids);
+        if(!empty($user_ids)){
+            foreach($user_ids as $key => $userId){
+                dump($userId);
+//                $this->redis->HDel("online_" . $party_id, $userId);
+//                $this->redis->zRem("party_user_".$party_id,$userId); //新加的
+//                $this->redis->hDel("livingUser", $userId);
+            }
+        }
+    }
+
 
     /**
      * 创建/进入派对