|
@@ -7,12 +7,12 @@ use Redis;
|
|
|
class Test
|
|
|
{
|
|
|
|
|
|
- public function redis(){
|
|
|
-
|
|
|
- $partyUserTop = $this->getPartyUserTop(54);
|
|
|
- }
|
|
|
+ public function outlivebc(){
|
|
|
+ $party_id = input('party_id');
|
|
|
+ if(empty($party_id)){
|
|
|
+ $this->error();
|
|
|
+ }
|
|
|
|
|
|
- private function getPartyUserTop($party_id) {
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
@@ -36,16 +36,18 @@ class Test
|
|
|
//$redis->hSet("livebc_jewel_top3",$party_id,json_encode($avatarArr));
|
|
|
}
|
|
|
dump($avatarArr);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public function clear(){
|
|
|
- $user_id = 26;
|
|
|
+ $paery_id = 54;
|
|
|
//清空房间排行榜
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
- $redis->del('livebc_jewel_to_' . $user_id);
|
|
|
- $redis->hDel("livebc_jewel_top3",$user_id);
|
|
|
+ $redis->del('livebc_jewel_to_' . $paery_id);
|
|
|
+ $redis->del('livebc_jewel_get_' . $paery_id);
|
|
|
+ $redis->hDel("user_jewel_top3",$paery_id);
|
|
|
}
|
|
|
|
|
|
|