From b63184ce52b565189a2e492457d4e19db01e8d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Tue, 23 Dec 2025 18:34:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B2=E7=9B=92=E8=BD=AC=E7=9B=98=E8=90=BD?= =?UTF-8?q?=E5=8C=85=EF=BC=8C=E5=8A=A0=E6=8E=A8=E9=80=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BlindBoxTurntableGiftDrawWorldNew.php | 36 ++++++++++++++++++- application/api/model/Room.php | 2 +- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php b/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php index 0801149e..fcdf010c 100644 --- a/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php +++ b/application/api/model/BlindBoxTurntableGiftDrawWorldNew.php @@ -1554,12 +1554,14 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model if (isset($send_result['code']) && $send_result['code'] !== 1) { throw new \Exception($send_result['msg']); } - $gift_counts = $send_result['data']; // 插入抽奖结果 $this->batchInsertBlindBoxResults($precomputed_results, $log_id); + //中大奖礼物飘屏 + $this->pushGiftBanner($bag_data,$user_id,$gift_counts,$room_id); + Db::commit(); // 返回结果 @@ -1776,4 +1778,36 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model } return ['code' => 1, 'msg' => '发送礼物成功', 'data' => $giftCounts]; } + + /** + * 岁月之城,时空之旅抽奖-处理中奖通知 推送礼物横幅 + */ + private function pushGiftBanner($bag_data,$user_id,$gift_counts,$room_id) + { + if($gift_counts){ + $user_nickname = Db::name('user')->where(['id'=>$user_id])->value('nickname'); + $text_list_new = []; + foreach ($gift_counts as $value) { + $draw_gift = Db::name('vs_gift')->where(['gid'=>$value['gift_id']])->find(); + if($draw_gift['is_public_server'] == 1){ + $text_message = $user_nickname . '在' . $bag_data['gift_bag_name'] . '中获得了礼物' . $draw_gift['gift_name'] . 'X' . $value['count']."\n"; + $text_list_new[] = [ + 'text' => $text_message, + 'gift_picture' => $draw_gift['base_image'], + 'room_id' => $room_id, + 'fromUserName' => $user_nickname, + 'toUserName' => '', + 'giftName' => $draw_gift['gift_name'], + 'roomId' => $room_id, + 'number' => $value['count'], + ]; + } + if(!empty($text_list_new)){ + //推送礼物横幅 + $push = new Push($user_id, $room_id); + $push->giftBanner($text_list_new); + } + } + } + } } \ No newline at end of file diff --git a/application/api/model/Room.php b/application/api/model/Room.php index f99c2281..08b18237 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -2034,7 +2034,7 @@ class Room extends Model $user_info['guild_name'] = null; } //用户所属工会 - $me_guild_id = Db::name('vs_guild_user')->where(['user_id'=>$uid,'delete_time'=>0,'status' => 1])->value('guild_id'); + $me_guild_id = Db::name('vs_guild_user')->where(['user_id'=>$uid,'delete_time'=>0,'status' => ['<>',3]])->value('guild_id'); if($me_guild_id){ $user_info['me_guild_id'] = db::name('vs_guild')->where(['id'=>$me_guild_id])->value('guild_special_id'); $user_info['me_guild_name'] = db::name('vs_guild')->where(['id'=>$me_guild_id])->value('guild_name');