From a1f0578c29415a3e96a3f758a161808fb74d81ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Fri, 14 Nov 2025 10:35:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/adminapi/controller/SingerSong.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/adminapi/controller/SingerSong.php b/application/adminapi/controller/SingerSong.php index f76bf50..622a4f3 100644 --- a/application/adminapi/controller/SingerSong.php +++ b/application/adminapi/controller/SingerSong.php @@ -179,15 +179,15 @@ class SingerSong extends adminApi return V(0, '请填写房间ID'); } if($type==1){ - $where['createtime'] = ['between', [strtotime(date('Y-m-d')), strtotime(date('Y-m-d', strtotime('+1 day')))]]; + $where['o.createtime'] = ['between', [strtotime(date('Y-m-d')), strtotime(date('Y-m-d', strtotime('+1 day')))]]; }elseif($type==2){ - $where['createtime'] = ['between', [strtotime(date('Y-m-d', strtotime('-7 day'))), strtotime(date('Y-m-d'))]]; + $where['o.createtime'] = ['between', [strtotime(date('Y-m-d', strtotime('-7 day'))), strtotime(date('Y-m-d'))]]; }elseif($type==3){ - $where['createtime'] = ['between', [strtotime(date('Y-m-01')), strtotime(date('Y-m-t', strtotime(date('Y-m-01'))))]]; + $where['o.createtime'] = ['between', [strtotime(date('Y-m-01')), strtotime(date('Y-m-t', strtotime(date('Y-m-01'))))]]; }elseif($type==4){ - $where['createtime'] = ['between', [strtotime(date('Y-m-d', strtotime('-1 day'))), strtotime(date('Y-m-d'))]]; + $where['o.createtime'] = ['between', [strtotime(date('Y-m-d', strtotime('-1 day'))), strtotime(date('Y-m-d'))]]; } - $count = db::name('vs_song_log')->where($where)->count(); + $count = db::name('vs_song_log')->alias('o')->where($where)->count(); $list = db::name('vs_song_log') ->alias('o') ->join('user u', 'o.user_id=u.id')