|
@@ -360,20 +360,20 @@ class Party extends Api
|
|
|
$this->error('房主才能解散');
|
|
|
}
|
|
|
|
|
|
- //清空麦位,属性
|
|
|
- //清空麦位小红心,redis
|
|
|
- //清空房间人,聊天室
|
|
|
- //清除两榜,redis
|
|
|
- //初始化房间信息,属性
|
|
|
|
|
|
- //用户魅力值
|
|
|
- $this->redis->zIncrBy("hourCharm_".$party_id, $hotValue, $user_id);
|
|
|
+ //用户魅力榜,清空
|
|
|
+ $this->redis->zRemRangeByRank("hourCharm_".$party_id, 0,-1);
|
|
|
|
|
|
- //用户贡献值
|
|
|
- $this->redis->zIncrBy("hourWealth_".$party_id, $hotValue, $user_id);
|
|
|
+ //用户贡献榜,清空
|
|
|
+ $this->redis->zRemRangeByRank("hourWealth_".$party_id, 0,-1);
|
|
|
|
|
|
+ //贡献榜前三,设置为空
|
|
|
+ $this->redis->hSet("user_jewel_top3",$party_id,json_encode([]));
|
|
|
|
|
|
- // redis操作
|
|
|
+ //排麦列表,清空
|
|
|
+ $this->redis->hSet("party_lineup",$party_id,serialize([]));
|
|
|
+
|
|
|
+ //清空房间
|
|
|
$user_ids = $this->redis->hGetAll("online_".$party_id);
|
|
|
if(!empty($user_ids)){
|
|
|
foreach($user_ids as $key => $userId){
|
|
@@ -383,16 +383,17 @@ class Party extends Api
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//环信操作
|
|
|
$easemob_room_id = $partyInfo['easemob_room_id'];
|
|
|
if(!empty($easemob_room_id)){
|
|
|
|
|
|
- //重置自定义属性
|
|
|
+ ///初始化房间信息,重置自定义属性
|
|
|
$matedata = [
|
|
|
- 'waitsing_list' => json_encode([]),//清空房间待唱列表
|
|
|
- 'online_user_num' => 0,//当前房间在线的人
|
|
|
+ 'waitsing_list' => json_encode([]), //清空房间待唱列表
|
|
|
+ 'online_user_num' => 0, //当前房间在线的人
|
|
|
+ 'wealth_top3_userlist' => json_encode([]),//财富榜前3个人列表
|
|
|
];
|
|
|
+
|
|
|
$easemob = new Easemob();
|
|
|
$easemob->room_setRoomCustomAttributeForced($partyInfo['easemob_room_id'],$partyInfo['user_id'],$matedata);
|
|
|
|
|
@@ -420,6 +421,13 @@ class Party extends Api
|
|
|
$seatdata['seat'.$i] = json_encode($seat);
|
|
|
}
|
|
|
$easemob->room_setRoomCustomAttributeForced($easemob_room_id,$this->auth->id,$seatdata);
|
|
|
+
|
|
|
+ //清空房间人,聊天室
|
|
|
+ //分页获取聊天室成员列表
|
|
|
+ $easemob->room_listRoomMembers($easemob_room_id,0);
|
|
|
+ //批量移除聊天室成员
|
|
|
+ $easemob->room_removeRoomMembers($easemob_room_id,$usernames);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
$this->success();
|