作者 lyh

gx

@@ -115,7 +115,9 @@ class ProductController extends BaseController @@ -115,7 +115,9 @@ class ProductController extends BaseController
115 $str[] = $this->map['category_id']; 115 $str[] = $this->map['category_id'];
116 $this->getAllSub($this->map['category_id'],$str); 116 $this->getAllSub($this->map['category_id'],$str);
117 $query->where(function ($subQuery) use ($str) { 117 $query->where(function ($subQuery) use ($str) {
118 - $subQuery->orWhereRaw("FIND_IN_SET(?, category_id) > 0", $str); 118 + foreach ($str as $v) {
  119 + $subQuery->orWhereRaw("FIND_IN_SET(?, category_id) > 0", [$v]);
  120 + }
119 }); 121 });
120 } 122 }
121 if(isset($this->map['title']) && !empty($this->map['title'])){ 123 if(isset($this->map['title']) && !empty($this->map['title'])){