refactor: 修改几在模块支持多分类筛选

This commit is contained in:
2025-06-06 11:24:58 +08:00
parent 732132f287
commit a821156077
7 changed files with 43 additions and 3 deletions

View File

@@ -71,6 +71,10 @@ class SysBannerItemModel extends SysBannerItemBaseModel
public function scopeBannerId($query, $value)
{
if (is_null($value)) return;
if (is_array($value) || str_contains($value, ',')) {
$query->whereIn('banner_id', $value);
return;
}
$query->where('banner_id', '=', $value);
}
}