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