From 9c957165ff2708607d9f8d06552fa070cc7975e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Mon, 13 Oct 2025 21:01:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=9C=80=E6=B1=82-=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E9=9C=80=E6=B1=82-=E7=9B=B2=E7=9B=92=E8=BD=AC=E7=9B=98?= =?UTF-8?q?=E8=B0=83=E9=80=9A=E7=9B=98-=E8=B0=83=E8=AF=95-=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/adminapi/controller/BlindBox.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/application/adminapi/controller/BlindBox.php b/application/adminapi/controller/BlindBox.php index a3677ca..ec194ac 100644 --- a/application/adminapi/controller/BlindBox.php +++ b/application/adminapi/controller/BlindBox.php @@ -730,7 +730,9 @@ class BlindBox extends adminApi $stime = input('stime', ''); $etime = input('etime', ''); $where = []; - $where['room_id'] = $room_id; + if($room_id){ + $where['room_id'] = $room_id; + } if($gift_id){ $where['gift_id'] = $gift_id; } @@ -755,8 +757,8 @@ class BlindBox extends adminApi if($stime!=="" && $etime!==""){ $where['createtime'] = ['between', [strtotime($stime), strtotime($etime.'23:59:59')]]; } - $count = db::name('vs_gift_bag_receive_log')->where($where)->count(); - $lists_data = db::name('vs_gift_bag_receive_log')->where($where)->page($page, $page_limit)->order("id desc")->select(); + $count = db::name('vs_gift_bag_receive_pan_log')->where($where)->count(); + $lists_data = db::name('vs_gift_bag_receive_pan_log')->where($where)->page($page, $page_limit)->order("id desc")->select(); $lists = []; foreach ($lists_data as $key => $value) { $lists[$key]['id'] = $value['id']; @@ -787,7 +789,7 @@ class BlindBox extends adminApi $lists[$key]['gift_num'] = $value['num']; $lists[$key]['createtime'] = date('Y-m-d H:i:s',$value['createtime']); } - $all_lists_data = db::name('vs_gift_bag_receive_log')->where($where)->order("id desc")->select(); + $all_lists_data = db::name('vs_gift_bag_receive_pan_log')->where($where)->order("id desc")->select(); $total =0; $total_gift_money = 0; $total_money = 0; @@ -844,7 +846,9 @@ class BlindBox extends adminApi $room_id = input('room_id', 0); $periods = input('periods', ''); $where = []; - $where['b.room_id'] = $room_id; + if($room_id){ + $where['b.room_id'] = $room_id; + } if($gift_id){ $where['b.gift_id'] = $gift_id; }