1
0
Fork 0

Compare commits

..

No commits in common. "007f5bb08d460f035383cdb572264af7fdbef5aa" and "fc8d414a199f7788f916ae0fb9919ad5563669a4" have entirely different histories.

1 changed files with 3 additions and 13 deletions

View File

@ -38,18 +38,8 @@ class MonitorModeFilter extends ModelFilter
/**
* 分组
*/
public function groupTags($groupTags){
if(strpos($groupTags, ',')){
$this->where(function($q) use ($groupTags) {
foreach(explode(',', $groupTags) as $tag){
$q->whereRaw("FIND_IN_SET('".$tag."',group_tags)");
}
return $q;
});
}else{
return $this->whereRaw("FIND_IN_SET('".$groupTags."',group_tags)");
}
public function groupTags($groupTags)
{
return $this->whereRaw("FIND_IN_SET(group_tags,'$groupTags')");
}
}