|
|
@@ -657,8 +657,10 @@ class CustomerService extends Service
|
|
|
if(! empty($data['belong_top_depart_title'])){
|
|
|
list($id, $depart_id) = $this->searchCustomerDepart($data['belong_top_depart_title']);
|
|
|
if($is_fp < 0){
|
|
|
- $model->whereIn('id', $id)
|
|
|
- ->orWhereIn('top_depart_id', $depart_id);
|
|
|
+ $model->where(function ($query) use ($id, $depart_id) {
|
|
|
+ $query->whereIn('id', $id)
|
|
|
+ ->orWhereIn('top_depart_id', $depart_id);
|
|
|
+ });
|
|
|
}elseif ($is_fp > 0){
|
|
|
$model->whereIn('id', $id);
|
|
|
}else{
|