更新是否是队长
This commit is contained in:
parent
89d8ca50ae
commit
a7054831b9
@ -93,14 +93,21 @@ class CompanyController extends BaseApiController
|
||||
return $this->success('success', ['count' => $count, 'data' => $data]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司人员
|
||||
*/
|
||||
public function users()
|
||||
{
|
||||
[$page, $limit] = $this->getPage();
|
||||
// $companyId = $this->request->param('company_id', 0);
|
||||
$params = $this->request->param();
|
||||
// if($companyId==0){
|
||||
// $companyId=$this->userInfo['company_id'];
|
||||
// }
|
||||
$query = User::where('company_id', $this->userInfo['company_id']);
|
||||
$wehre[]=['company_id','=',$this->userInfo['company_id']];
|
||||
if(isset($params['is_captain'])&& $params['is_captain']==1){
|
||||
$wehre[]= ['is_captain','=',1];
|
||||
}
|
||||
$query = User::where($wehre);
|
||||
$count = $query->count();
|
||||
$users = $query->page($page)->limit($limit)->with(['company' => function ($query) {
|
||||
$query->field('id,company_name');
|
||||
|
Loading…
x
Reference in New Issue
Block a user