巡乐会抽奖接口提交.-推送添加

This commit is contained in:
2025-08-29 14:17:42 +08:00
parent 1df47f6b89
commit 6d36d9f506
2 changed files with 30 additions and 18 deletions

View File

@@ -2,6 +2,7 @@
namespace app\cron\controller;
use app\common\controller\Push;
use think\Db;
@@ -88,8 +89,22 @@ class RoomPan
echo "处理发放记录失败 \n";
continue;
}
db::name("vs_room")->where('id',$value['room_id'])->update([
'xlh_periods_num' => 0
]);
//推送
$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('name');
$gift_name = db::name('vs_gift')->where(['id'=>$value['gift_id']])->value('gift_name');
$text = $FromUserInfo['nickname'] . ' 用户在 ' . $room_name.' 房间巡乐会中 ' .$gift_name.'礼物 x ' .$value['num']." 已收入背包";
//推送礼物横幅
$push = new Push(UID, $value['room_id']);
$text_list_new = [
'text' => $text,
'room_id' => $value['room_id'],
'from_type' => 3
];
$push->xunlehui($text_list_new);
}
}
}