update
This commit is contained in:
parent
eff40225f5
commit
4536b2962b
@ -154,11 +154,14 @@ class AdminController extends BaseAdminController
|
||||
//获取所有人员
|
||||
public function getAdminsByAll(): \think\response\Json
|
||||
{
|
||||
$params = $this->request->get(['exclude_id']);
|
||||
$params = $this->request->get(['exclude_id','org_id']);
|
||||
$where = [];
|
||||
if(!empty($params['exclude_id'])){
|
||||
$where[] = ['id','<>',$params['exclude_id']];
|
||||
}
|
||||
if(!empty($params['org_id'])){
|
||||
$where[] = ['org_id','<>',$params['org_id']];
|
||||
}
|
||||
$data = Admin::field('id,name,avatar,org_id,dept_id,job_id')->where($where)->select()->each(function($item){
|
||||
$job = Jobs::field('name')->where('id',$item['job_id'])->findOrEmpty();
|
||||
$dept = Dept::field('name')->where('id',$item['dept_id'])->findOrEmpty();
|
||||
|
Loading…
x
Reference in New Issue
Block a user