正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
| @@ -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'])){ |
-
请 注册 或 登录 后发表评论