巡乐会抽奖接口提交.-联调-巡乐会结束 脚本调整

This commit is contained in:
2025-09-01 16:14:03 +08:00
parent 5467d0bd66
commit 3628f6dc54

View File

@@ -16,7 +16,7 @@ class RoomPan
*/
function index()
{
echo "巡乐会结束 礼物发放:\n";
echo "巡乐会礼物发放开始\n";
$this->xlh_gift_send();//拍卖房结束提醒
echo "礼物发放结束 \n";
@@ -61,6 +61,7 @@ class RoomPan
echo "没有需要发放的礼物 \n";
}
foreach ($xlh_list as $key=>$value){
try{
//发放
//抽中礼物落包
$res = [];
@@ -86,7 +87,7 @@ class RoomPan
'send_time' => time()
]);
$xlh_log = db::name('vs_room_pan_xlh_log')->where(['xlh_id'=>$value['id'],'user_id'=>$value['user_id']])->order('id desc')->find();
$res = db::name('vs_room_pan_xlh_log')->where('id',$xlh_log)->update([
$res = db::name('vs_room_pan_xlh_log')->where('id',$xlh_log['id'])->update([
'is_send' => 1
]);
if ($res === false) {
@@ -99,16 +100,19 @@ class RoomPan
//推送
$FromUserInfo = db::name('user')->field('nickname,avatar')->where(['id'=>$value['user_id']])->find();
$room_name = db::name('vs_room')->where(['id'=>$value['room_id']])->value('room_name');
$gift_name = db::name('vs_gift')->where(['id'=>$value['gift_id']])->value('gift_name');
$gift_name = db::name('vs_gift')->where(['gid'=>$value['gift_id']])->value('gift_name');
$text = $FromUserInfo['nickname'] . ' 用户在 ' . $room_name.' 房间巡乐会中 ' .$gift_name.'礼物 x ' .$value['num']." 已收入背包";
//推送礼物横幅
$push = new Push(UID, $value['room_id']);
$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);
}catch (\Exception $e){
echo $e->getMessage()."\n";
}
}
}
}