Merge branch 'develop'

This commit is contained in:
mzl
2025-08-14 20:08:57 +08:00
parent f4a2966b1e
commit 39e840bba8
49 changed files with 2240 additions and 522 deletions
+21 -2
View File
@@ -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'];