|
@@ -231,7 +231,7 @@ class Backend extends Controller
|
|
|
$this->assign('admin', Session::get('admin'));
|
|
|
}
|
|
|
|
|
|
- protected function whereop($alias = ''){
|
|
|
+ protected function whereop($field = ''){
|
|
|
|
|
|
$where_op = [];
|
|
|
|
|
@@ -240,12 +240,12 @@ class Backend extends Controller
|
|
|
if($group_id == 9){ //分公司
|
|
|
$company_ids = Db::name('company')->where('agent_id',$this->auth->id)->column('id');
|
|
|
if(!empty($company_ids)){
|
|
|
- $where_op[$alias.'.id'] = ['IN',$company_ids];
|
|
|
+ $where_op[$field] = ['IN',$company_ids];
|
|
|
}
|
|
|
}
|
|
|
if($group_id == 6 || $group_id == 7){ //老板或员工
|
|
|
if($this->auth->company_id){
|
|
|
- $where_op[$alias.'.id'] = $this->auth->company_id;
|
|
|
+ $where_op[$field] = $this->auth->company_id;
|
|
|
}
|
|
|
}
|
|
|
return $where_op;
|