更新房间数据判断是否在房间

This commit is contained in:
2025-09-05 11:51:53 +08:00
parent 1107209f3f
commit 806c45abc4

View File

@@ -1855,6 +1855,10 @@ class Room extends Model
if(!$room_id){
return ['code' => 0, 'msg' => '参数错误', 'data' => null];
}
$user_in_room = db::name('vs_room_visitor')->where(['room_id' => $room_id,'user_id' => $user_id])->find();
if(!$user_in_room){
return ['code' => 0, 'msg' => '您已不在此房间', 'data' => null];
}
$room = db::name('vs_room')->where(['id' => $room_id])->find();
$song_list = null;
$next_song_info = null;