更新
This commit is contained in:
parent
b19a5517b3
commit
7cafe46a06
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user