From ee3b0edb337aac2293e7c8f03a7666c5e4dc4712 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Tue, 5 Aug 2025 16:00:16 +0800 Subject: [PATCH 1/2] 1 --- app/crmAdmin/controller/CustomerController.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/crmAdmin/controller/CustomerController.php b/app/crmAdmin/controller/CustomerController.php index d08efbf..153941a 100644 --- a/app/crmAdmin/controller/CustomerController.php +++ b/app/crmAdmin/controller/CustomerController.php @@ -44,14 +44,10 @@ class CustomerController extends BaseController */ public function export(Request $request) { - set_time_limit(300); try { $param = $request->all(); // $corp = Corp::where(['abbr' => $request->basic_data['corp_abbr']])->first(); // $param['corp_abbr'] = $corp->id; - if(empty($param['user_id']) && empty($param['tag_id'])){ - return $this->error('请勿一次性下载所有数据,请筛选后下载需要的数据'); - } $result = (new CustomerService())->export($param); $excelContent = file_get_contents($result['filepath']); From b696c3354835a707dfdb586617618bb222604326 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Tue, 5 Aug 2025 16:06:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/crmAdmin/service/CustomerService.php | 5 +++++ 1 file changed, 5 insertions(+) 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对象