抱上麦 申请处理
This commit is contained in:
@@ -1122,6 +1122,19 @@ class RoomPit extends Model
|
||||
//聊天室推送系统消息
|
||||
model('api/Chat')->sendMsg(1022,$room_id,$text);
|
||||
Cache::set('auction_user_'.$room_id,$accept_user_id);
|
||||
//查找当前用户是否有申请上麦 有就删掉
|
||||
$is_apply_pit = db::name('vs_room_pit_apply')->where(['room_id' => $room_id, 'user_id' => $accept_user_id])->find();
|
||||
if($is_apply_pit){
|
||||
db::name('vs_room_pit_apply')->where(['room_id' => $room_id, 'user_id' => $accept_user_id])->delete();
|
||||
}
|
||||
|
||||
$count = db::name('vs_room_pit_apply')->where(['room_id' => $room_id,'status' => 0])->count();
|
||||
//申请上麦推送消息
|
||||
$text = [
|
||||
'text' => '申请上麦',
|
||||
'count' => $count
|
||||
];
|
||||
model('Chat')->sendMsg(1034,$room_id,$text);
|
||||
return ['code' => 1, 'msg' => '操作成功', 'data' => null];
|
||||
}
|
||||
}
|
||||
@@ -1152,6 +1165,19 @@ class RoomPit extends Model
|
||||
//聊天室推送系统消息
|
||||
model('api/Chat')->sendMsg(1022,$room_id,$text);
|
||||
Cache::set('auction_user_'.$room_id,$accept_user_id);
|
||||
//查找当前用户是否有申请上麦 有就删掉
|
||||
$is_apply_pit = db::name('vs_room_pit_apply')->where(['room_id' => $room_id, 'user_id' => $accept_user_id])->find();
|
||||
if($is_apply_pit){
|
||||
db::name('vs_room_pit_apply')->where(['room_id' => $room_id, 'user_id' => $accept_user_id])->delete();
|
||||
}
|
||||
|
||||
$count = db::name('vs_room_pit_apply')->where(['room_id' => $room_id,'status' => 0])->count();
|
||||
//申请上麦推送消息
|
||||
$text = [
|
||||
'text' => '申请上麦',
|
||||
'count' => $count
|
||||
];
|
||||
model('Chat')->sendMsg(1034,$room_id,$text);
|
||||
return ['code' => 1, 'msg' => '操作成功', 'data' => null];
|
||||
}
|
||||
//判断当前麦位是否为空
|
||||
|
||||
Reference in New Issue
Block a user