diff --git a/app/crmAdmin/service/CustomerService.php b/app/crmAdmin/service/CustomerService.php index 17ae60f..07681cd 100644 --- a/app/crmAdmin/service/CustomerService.php +++ b/app/crmAdmin/service/CustomerService.php @@ -84,6 +84,8 @@ class CustomerService if (!empty($user_id)) { $query->whereIn('user_id', explode(',', $user_id)); + } elseif ($user_id === 0 && $export) { + $query->where('user_id', 0); } if (!empty($tagId)) { @@ -137,6 +139,9 @@ class CustomerService public function export($params) { + if(empty($param['user_id']) && empty($param['tag_id'])){ + $params['user_id'] = 0; + } $customers = $this->search($params, true); // 创建新的Spreadsheet对象