This commit is contained in:
2025-08-05 14:13:31 +08:00
parent d56ad1a919
commit 76d4093727
+3 -3
View File
@@ -88,13 +88,13 @@ class CustomerService
if (!empty($tagId)) { if (!empty($tagId)) {
//查询有$tagId 里任意一个标签的客户 //查询有$tagId 里任意一个标签的客户
//$query->whereHas('tags', function($query) use ($tagId){ //$query->whereHas('crm_tag', function($query) use ($tagId){
// $query->whereIn ('tag.id', $tagId); // $query->whereIn ('tag.id', $tagId);
//}); //});
//查询有$tagId 里所有标签的客户 //查询有$tagId 里所有标签的客户
foreach ($tagId as $id) { foreach ($tagId as $id) {
$query->whereHas('tags', function ($query) use ($id) { $query->whereHas('crm_tag', function ($query) use ($id) {
$query->where('tag.id', $id); $query->where('crm_tag.id', $id);
}); });
} }
} }