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')