diff --git a/app/crm/service/CustomerService.php b/app/crm/service/CustomerService.php index 2096b5a..0573972 100644 --- a/app/crm/service/CustomerService.php +++ b/app/crm/service/CustomerService.php @@ -160,11 +160,11 @@ class CustomerService } // 关键字 if (isset($p['keyword']) && $p['keyword']) { $k = '%' . $p['keyword'] . '%'; - $config['where']['contacts'] = ['like', $k]; - $config['where']['phone'] = ['like', $k]; - $config['where']['email'] = ['like', $k]; - $config['where']['WhatsApp'] = ['like', $k]; - $config['where']['code'] = ['like', $k]; + $config['orWhere'][] = ['contacts','like', $k]; + $config['orWhere'][] = ['phone','like', $k]; + $config['orWhere'][] = ['email','like', $k]; + $config['orWhere'][] = ['WhatsApp','like', $k]; + $config['orWhere'][] = ['code','like', $k]; } $config['order']['id'] = 'desc'; $config['dataLimit']['type'] = 'relation';