diff --git a/application/project/controller/Project.php b/application/project/controller/Project.php index d6b6c03..bb8d878 100755 --- a/application/project/controller/Project.php +++ b/application/project/controller/Project.php @@ -588,7 +588,9 @@ class Project extends BasicApi } $data=[]; foreach($select as $k=>$v){ - $find=Db::name('positioning')->where(['member_code'=>$v['member_code']])->whereTime('date','today')->order('date desc')->field('positioning,date,end_date')->find(); + $date=date('Y-m-d H:i:s'); + $end=date('Y-m-d H:i:s',time()-300); + $find=Db::name('positioning')->where(['member_code'=>$v['member_code']])->whereTime('date',[$end,$date])->order('date desc')->field('positioning,date,end_date')->find(); $data[$k]=[ 'name'=>$v['name'], 'avatar'=>$v['avatar'], @@ -629,7 +631,7 @@ class Project extends BasicApi if($date==''){ $date=date('Y-m-d H:i:s'); $end=date('Y-m-d H:i:s',time()-300); - $select=Db::name('positioning')->where(['member_code'=>$code])->whereTime('date',[$end,$date])->column('positioning'); + $select=Db::name('positioning')->where(['member_code'=>$code])->whereTime('date',[$end,$date])->fetchSql(true)->column('positioning'); }else{ $select=Db::name('positioning')->where(['member_code'=>$code])->whereBetweenTime('date',$date)->column('positioning'); }