From 9fdcf751ea60dccf627a7b29a5abcce61b0b98c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Sat, 27 Sep 2025 17:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=97=B6=E9=97=B4=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/adminapi/controller/Adminlog.php | 4 +-- application/adminapi/controller/GiveGift.php | 4 +-- application/adminapi/controller/Room.php | 4 +-- .../adminapi/controller/Statistical.php | 32 +++++++++---------- application/adminapi/controller/User.php | 4 +-- .../adminapi/controller/Withdrawal.php | 4 +-- application/adminapi/model/Room.php | 6 ++-- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/application/adminapi/controller/Adminlog.php b/application/adminapi/controller/Adminlog.php index 5242adc..7792d1b 100644 --- a/application/adminapi/controller/Adminlog.php +++ b/application/adminapi/controller/Adminlog.php @@ -52,10 +52,10 @@ class Adminlog extends adminApi $where['createtime'] = ['>=', strtotime($search_stime)]; } if ($search_etime) { - $where['createtime'] = ['<=', strtotime($search_etime.' 23:59:59')]; + $where['createtime'] = ['<=', strtotime($search_etime)]; } if(!empty($search_stime) && !empty($search_etime)){ - $where['createtime'] = ['between',[strtotime($search_stime),strtotime($search_etime.' 23:59:59')]]; + $where['createtime'] = ['between',[strtotime($search_stime),strtotime($search_etime)]]; } $list_data = $this->model->where($where)->where('admin_id', 'in', $this->childrenAdminIds)->order('createtime', 'desc')->paginate($page_limit, false, ['page' => $page]); diff --git a/application/adminapi/controller/GiveGift.php b/application/adminapi/controller/GiveGift.php index 200b6d6..8610568 100644 --- a/application/adminapi/controller/GiveGift.php +++ b/application/adminapi/controller/GiveGift.php @@ -56,11 +56,11 @@ class GiveGift extends adminApi // 时间筛选优化 if (!empty($start_time) || !empty($end_time)) { if (!empty($start_time) && !empty($end_time)) { - $where['createtime'] = ['between', [strtotime($start_time), strtotime($end_time.' 23:59:59')]]; + $where['createtime'] = ['between', [strtotime($start_time), strtotime($end_time)]]; } elseif (!empty($start_time)) { $where['createtime'] = ['>=', strtotime($start_time)]; } elseif (!empty($end_time)) { - $where['createtime'] = ['<=', strtotime($end_time.' 23:59:59')]; + $where['createtime'] = ['<=', strtotime($end_time)]; } } //礼物总数 diff --git a/application/adminapi/controller/Room.php b/application/adminapi/controller/Room.php index c9531c0..8e06bad 100644 --- a/application/adminapi/controller/Room.php +++ b/application/adminapi/controller/Room.php @@ -1465,10 +1465,10 @@ class Room extends adminApi $where['createtime'] = ['>=',strtotime($stime)]; } if(!empty($etime)){ - $where['createtime'] = ['<=',strtotime($etime.' 23:59:59')]; + $where['createtime'] = ['<=',strtotime($etime)]; } if(!empty($stime) && !empty($etime)){ - $where['createtime'] = ['between',[strtotime($stime),strtotime($etime.' 23:59:59')]]; + $where['createtime'] = ['between',[strtotime($stime),strtotime($etime)]]; } $room_log_lists = db::name($this->table_room_log)->where($where)->order('id desc')->page($page, $page_limit)->select(); $count = db::name($this->table_room_log)->where($where)->count(); diff --git a/application/adminapi/controller/Statistical.php b/application/adminapi/controller/Statistical.php index afa159a..5070931 100644 --- a/application/adminapi/controller/Statistical.php +++ b/application/adminapi/controller/Statistical.php @@ -37,10 +37,10 @@ class Statistical extends adminApi $where['createtime'] = ['>=', strtotime($begin_time)]; } if($end_time !== ''){ - $where['createtime'] = ['<=', strtotime($end_time.' 23:59:59')]; + $where['createtime'] = ['<=', strtotime($end_time)]; } if(!empty($begin_time) && !empty($end_time)){ - $where['createtime'] = ['between',[strtotime($begin_time),strtotime($end_time.' 23:59:59')]]; + $where['createtime'] = ['between',[strtotime($begin_time),strtotime($end_time)]]; } $where['pay_status'] = 2;//1待支付,2已支付 @@ -112,10 +112,10 @@ class Statistical extends adminApi $where['createtime'] = ['>=', strtotime($begin_time)]; } if($end_time !== ''){ - $where['createtime'] = ['<=', strtotime($end_time.' 23:59:59')]; + $where['createtime'] = ['<=', strtotime($end_time)]; } if(!empty($begin_time) && !empty($end_time)){ - $where['createtime'] = ['between',[strtotime($begin_time),strtotime($end_time.' 23:59:59')]]; + $where['createtime'] = ['between',[strtotime($begin_time),strtotime($end_time)]]; } $count = db::name('vs_give_gift') ->where($where) @@ -177,10 +177,10 @@ class Statistical extends adminApi $where['createtime'] = ['>=', strtotime($begin_time)]; } if($end_time !== ''){ - $where['createtime'] = ['<=', strtotime($end_time.' 23:59:59')]; + $where['createtime'] = ['<=', strtotime($end_time)]; } if(!empty($begin_time) && !empty($end_time)){ - $where['createtime'] = ['between',[strtotime($begin_time),strtotime($end_time.' 23:59:59')]]; + $where['createtime'] = ['between',[strtotime($begin_time),strtotime($end_time)]]; } // 1.系统调节 2.充值 3.提现 4.金币转增(送出) 5.每日任务奖励 6.充值返利 7.购买装扮 // 8.礼盒奖励 9.房间补贴 10.购买礼物 11.收礼增加收益 12.工会补贴 13.转赠金币(接收) 14.收益兑换 @@ -239,10 +239,10 @@ class Statistical extends adminApi $where['createtime'] = ['>=', strtotime($begin_time)]; } if($end_time !== ''){ - $where['createtime'] = ['<=', strtotime($end_time.' 23:59:59')]; + $where['createtime'] = ['<=', strtotime($end_time)]; } if(!empty($begin_time) && !empty($end_time)){ - $where['createtime'] = ['between',[strtotime($begin_time),strtotime($end_time.' 23:59:59')]]; + $where['createtime'] = ['between',[strtotime($begin_time),strtotime($end_time)]]; } //不为空 $where['from'] = 2; @@ -260,8 +260,8 @@ class Statistical extends adminApi foreach ($lists as $key => $value) { $room = db::name('vs_room')->where('id', $value['from_id'])->find(); $lists[$key]['createtime'] = date('Y-m-d H:i:s', $value['createtime']); - $lists[$key]['room_name'] = $room['room_name'].'-'.$room['room_number']; - $lists[$key]['room_number'] = $room['room_number']; + $lists[$key]['room_name'] = $room['room_name']??"".'-'.$room['room_number']?? ""; + $lists[$key]['room_number'] = $room['room_number']?? ""; $lists[$key]['room_cover'] = db::name('vs_room')->where('id', $value['from_id'])->value('room_cover'); $label = db::name('vs_room')->where('id', $value['from_id'])->value('label_id'); $lists[$key]['label'] = db::name('vs_room_label')->where('id', $label)->value('label_name'); @@ -302,10 +302,10 @@ class Statistical extends adminApi $where['createtime'] = ['>=', strtotime($pay_stime)]; } if($pay_etime !== ''){ - $where['createtime'] = ['<=', strtotime($pay_etime.' 23:59:59')]; + $where['createtime'] = ['<=', strtotime($pay_etime)]; } if(!empty($pay_stime) && !empty($pay_etime)){ - $where['createtime'] = ['between',[strtotime($pay_stime),strtotime($pay_etime.' 23:59:59')]]; + $where['createtime'] = ['between',[strtotime($pay_stime),strtotime($pay_etime)]]; } if($pay_status !== ''){ $where['pay_status'] = $pay_status; @@ -383,10 +383,10 @@ class Statistical extends adminApi $where['a.createtime'] = ['>=', strtotime($start_time)]; } if($end_time !== ''){ - $where['a.createtime'] = ['<=', strtotime($end_time.' 23:59:59')]; + $where['a.createtime'] = ['<=', strtotime($end_time)]; } if($start_time !== '' && $end_time !== ''){ - $where['a.createtime'] = ['between', [strtotime($start_time), strtotime($end_time.' 23:59:59')]]; + $where['a.createtime'] = ['between', [strtotime($start_time), strtotime($end_time)]]; } $count = db::name('user_exchange')->where($where)->alias('a')->join('user b', 'a.user_id = b.id')->count(); @@ -429,10 +429,10 @@ class Statistical extends adminApi $where['a.createtime'] = ['>=', strtotime($start_time)]; } if($end_time !== ''){ - $where['a.createtime'] = ['<=', strtotime($end_time.' 23:59:59')]; + $where['a.createtime'] = ['<=', strtotime($end_time)]; } if($start_time !== '' && $end_time !== ''){ - $where['a.createtime'] = ['between', [strtotime($start_time), strtotime($end_time.' 23:59:59')]]; + $where['a.createtime'] = ['between', [strtotime($start_time), strtotime($end_time)]]; } $count = db::name('vs_admin_recharge_log') ->alias('a')->join('user b', 'a.user_id = b.id') diff --git a/application/adminapi/controller/User.php b/application/adminapi/controller/User.php index 6108c7a..0d4f707 100644 --- a/application/adminapi/controller/User.php +++ b/application/adminapi/controller/User.php @@ -74,8 +74,8 @@ class User extends adminApi }elseif($v=='coin2'){ $where['c.coin'] = ['<=',$input_data]; }elseif($v=='createtime'){ - $where['a.createtime'] = ['>=',strtotime($input_data.' 00:00:00')]; - $where['a.createtime'] = ['<=',strtotime($input_data.' 23:59:59')]; + $where['a.createtime'] = ['>=',strtotime($input_data)]; + $where['a.createtime'] = ['<=',strtotime($input_data)]; }else{ $where['a.'.$v] = $input_data; } diff --git a/application/adminapi/controller/Withdrawal.php b/application/adminapi/controller/Withdrawal.php index 6fda0a8..28c65bd 100644 --- a/application/adminapi/controller/Withdrawal.php +++ b/application/adminapi/controller/Withdrawal.php @@ -60,10 +60,10 @@ class Withdrawal extends adminApi $where['a.createtime'] = ['>=', strtotime($search_stime)]; } if($search_etime !== ''){ - $where['a.createtime'] = ['<=', strtotime($search_etime.' 23:59:59')]; + $where['a.createtime'] = ['<=', strtotime($search_etime)]; } if(!empty($search_stime) && !empty($search_etime)){ - $where['a.createtime'] = ['between',[strtotime($search_stime),strtotime($search_etime.' 23:59:59')]]; + $where['a.createtime'] = ['between',[strtotime($search_stime),strtotime($search_etime)]]; } $count = db::name('vs_user_withdrawal')->alias('a') ->join('user b', 'a.user_id = b.id', 'left') diff --git a/application/adminapi/model/Room.php b/application/adminapi/model/Room.php index 8b3f77b..366f070 100644 --- a/application/adminapi/model/Room.php +++ b/application/adminapi/model/Room.php @@ -75,13 +75,13 @@ class Room extends Model $give_where['from_id'] = $room_id; $give_where['from'] = ["in",[2,3,6]]; if(!empty($stime)){ - $give_where['createtime'] = ['>=',strtotime($stime.' 00:00:00')]; + $give_where['createtime'] = ['>=',strtotime($stime)]; } if(!empty($etime)){ - $give_where['createtime'] = ['<=',strtotime($etime.' 23:59:59')]; + $give_where['createtime'] = ['<=',strtotime($etime)]; } if(!empty($stime) && !empty($etime)){ - $give_where['createtime'] = ['between',[strtotime($stime.' 00:00:00'),strtotime($etime.' 23:59:59')]]; + $give_where['createtime'] = ['between',[strtotime($stime),strtotime($etime)]]; } $total_price = db::name('vs_give_gift')->where($give_where) ->sum('total_price');