From 1d28dc041c2397f973249f82b935ad0cb8d1ffc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Mon, 29 Sep 2025 19:11:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E9=97=B4=E5=B0=8F=E6=97=B6=E6=A6=9C?= =?UTF-8?q?=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cron/controller/RoomHourRanking.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/application/cron/controller/RoomHourRanking.php b/application/cron/controller/RoomHourRanking.php index efcfa1c..685855f 100644 --- a/application/cron/controller/RoomHourRanking.php +++ b/application/cron/controller/RoomHourRanking.php @@ -71,8 +71,9 @@ class RoomHourRanking } } } - $push = new Push(); + if ($gift_list && $room_owner) { + $text_list_new = []; foreach ($gift_list as $k => $v) { //礼物全部给他偷偷放在装扮表及金额 中 //有几个用户就发几个 @@ -101,13 +102,20 @@ class RoomHourRanking } $text_list_new[] = [ - 'text' => $text ?? '恭喜【'.$room_name.'】获得礼物!' + 'text' => $text ?? '恭喜【'.$room_name.'】获得礼物!', + 'room_id' => $room_owner[$k]['room_id'], + 'room_name' => $room_name, + 'rank_number' => $k + 1, ]; - $push->hourRanking($text_list_new); + } } } } + if(!empty($text_list_new)){ + $push = new Push(); + $push->hourRanking($text_list_new); + } } echo "送礼-共" . count($room_owner) . "个房间房主获益\n"; }