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];