更新
This commit is contained in:
parent
0b4beed3f7
commit
6cc0b93c67
@ -571,6 +571,25 @@ class Project extends BasicApi
|
|||||||
Db::name('positioning')->insert(['member_code'=>$member_code,'positioning'=>$positioning,'date'=>date('Y-m-d H:i:s')]);
|
Db::name('positioning')->insert(['member_code'=>$member_code,'positioning'=>$positioning,'date'=>date('Y-m-d H:i:s')]);
|
||||||
}
|
}
|
||||||
$this->success('');
|
$this->success('');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function positioning_list($department_code=''){
|
||||||
|
if($department_code){
|
||||||
|
$select= MemberAccount::where('department_code',$department_code)->where('status',1)->field('name,avatar,member_code')->select();
|
||||||
|
}else{
|
||||||
|
$select=Member::where('status',1)->field('name,avatar,member_code')->select();
|
||||||
|
}
|
||||||
|
$data=[];
|
||||||
|
foreach($select as $k=>$v){
|
||||||
|
$data[]=[
|
||||||
|
'name'=>$v['name'],
|
||||||
|
'avatar'=>$v['avatar'],
|
||||||
|
'member_code'=>$v['member_code'],
|
||||||
|
'positioning'=>Db::name('positioning')->where(['member_code'=>$v['member_code']])->order('date desc')->value('positioning'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
$this->success('',$data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user