巡乐会抽奖接口提交.-联调-盘-bug修改

This commit is contained in:
2025-09-03 18:16:12 +08:00
parent aec7cbe765
commit c58ac9559e
3 changed files with 36 additions and 11 deletions

View File

@@ -56,12 +56,31 @@ class RoomPan
* 巡乐会结束 礼物发放 【定时脚本】
*/
public function xlh_gift_send(){
$xlh_list = db::name('vs_room_pan_xlh')->where(['send_time'=>0,'user_id'=>['neq',0],'end_time'=>['<',time()]])->select();
$xlh_list = db::name('vs_room_pan_xlh')->where(['send_time'=>0,'end_time'=>['<',time()]])->select();
if(empty($xlh_list)){
echo "没有需要发放的礼物 \n";
}
foreach ($xlh_list as $key=>$value){
try{
if($value['user_id'] == 0){
echo "第.".$value['periods']." 巡乐会结束 没有中奖用户 \n";
$res = db::name('vs_room_pan_xlh')->where('id',$value['id'])->update([
'send_time' => time()
]);
db::name("vs_room")->where('id',$value['room_id'])->update([
'xlh_periods_num' => 0
]);
//推送礼物横幅
$text = "本轮巡乐会已结束,请大家重新开始下一轮巡乐会";
$push = new Push(0, $value['room_id']);
$text_list_new = [
'text' => $text,
'room_id' => $value['room_id'],
'from_type' => 3
];
$push->xunlehui($text_list_new);
continue;
}
//发放
//抽中礼物落包
$res = [];