From e5f02d1441445b609ba7cffcb0f9c3b0f508f629 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Fri, 25 Jul 2025 17:58:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/crm/controller/CustomerController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/crm/controller/CustomerController.php b/app/crm/controller/CustomerController.php index 81936eb..b6f7141 100644 --- a/app/crm/controller/CustomerController.php +++ b/app/crm/controller/CustomerController.php @@ -373,7 +373,10 @@ class CustomerController extends BaseController $where[] = ['created_at', '>=', $start]; $where[] = ['created_at', '<', $end]; $customer = Customer::where($where)->count(); - + $builder = Customer::where($where)->count(); + $sql = str_replace(['?'], ['\'%s\''], $builder->toSql()); + $fullSql = vsprintf($sql, $builder->getBindings()); + var_dump($fullSql); //初步接触 $whereGrade = $where; $whereGrade[] = ['grade', '<=', 2];