正在显示
1 个修改的文件
包含
1 行增加
和
3 行删除
| @@ -115,9 +115,7 @@ class ProductController extends BaseController | @@ -115,9 +115,7 @@ 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 | - foreach ($str as $v) { | ||
| 119 | - $subQuery->orWhereRaw("FIND_IN_SET(?, category_id) > 0", [$v]); | ||
| 120 | - } | 118 | + $subQuery->orWhereRaw("FIND_IN_SET(?, category_id) > 0", $str); |
| 121 | }); | 119 | }); |
| 122 | } | 120 | } |
| 123 | if(isset($this->map['title']) && !empty($this->map['title'])){ | 121 | if(isset($this->map['title']) && !empty($this->map['title'])){ |
-
请 注册 或 登录 后发表评论