|
...
|
...
|
@@ -80,7 +80,11 @@ class ProductController extends BaseController |
|
|
|
if (isset($this->map['category_id']) && !empty($this->map['category_id'])) {
|
|
|
|
$str = [];
|
|
|
|
$this->getAllSub($this->map['category_id'],$str);
|
|
|
|
$query = $query->whereIn('category_id',$str);
|
|
|
|
$query->where(function ($subQuery) use ($str) {
|
|
|
|
foreach ($str as $v) {
|
|
|
|
$subQuery->orWhereRaw("FIND_IN_SET(?, category_id) > 0", [$v]);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
if(isset($this->map['title']) && !empty($this->map['title'])){
|
|
|
|
$query = $query->where('title','like','%'.$this->map['title'].'%');
|
...
|
...
|
|