Merge branch 'develop'
This commit is contained in:
@@ -36,6 +36,7 @@ class CustomerService
|
||||
$follow = $params['follow'] ?? '';
|
||||
$follow_last = $params['follow_last'] ?? '';
|
||||
$tagId = $params['tag_id'] ?? [];
|
||||
$countryId = $params['country_id'] ?? '';
|
||||
$where = [];
|
||||
$user_id =$params['user_id'];
|
||||
|
||||
@@ -49,6 +50,9 @@ class CustomerService
|
||||
}
|
||||
$where[] = ['status', 1];
|
||||
|
||||
if (!empty($countryId)){
|
||||
$where[] = ['country_id', $countryId];
|
||||
}
|
||||
|
||||
$grade = [];
|
||||
if (!Util::isEmpty($follow) && $follow == 0) {
|
||||
@@ -84,7 +88,10 @@ class CustomerService
|
||||
if (!Util::isEmpty($keyword)) {
|
||||
$query->where(function ($query) use ($keyword) {
|
||||
$query->where('contacts', 'like', "%{$keyword}%")
|
||||
->orWhere('phone', 'like', "%{$keyword}%");
|
||||
->orWhere('phone', 'like', "%{$keyword}%")
|
||||
->orWhere('email', 'like', "%{$keyword}%")
|
||||
->orWhere('WhatsApp', 'like', "%{$keyword}%")
|
||||
->orWhere('code', 'like', "%{$keyword}%");
|
||||
});
|
||||
}
|
||||
if (!Util::isEmpty($grade)) {
|
||||
@@ -148,9 +155,16 @@ class CustomerService
|
||||
switch ($scene) {
|
||||
case 'index':
|
||||
$config['where']['status'] = 1; // 关键字
|
||||
if (isset($p['user_id']) && $p['user_id']) {
|
||||
$config['where']['user_id'] = $p['user_id'];
|
||||
} // 关键字
|
||||
if (isset($p['keyword']) && $p['keyword']) {
|
||||
$k = '%' . $p['keyword'] . '%';
|
||||
$config['where']['contacts'] = ['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';
|
||||
@@ -162,6 +176,11 @@ class CustomerService
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* 无用线索举报
|
||||
* @param $params
|
||||
* @return false
|
||||
*/
|
||||
public function report($params)
|
||||
{
|
||||
$id = $params['id'];
|
||||
|
||||
Reference in New Issue
Block a user