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"; }