正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -79,8 +79,8 @@ class ProductController extends BaseController | @@ -79,8 +79,8 @@ class ProductController extends BaseController | ||
| 79 | $query = $query->where('project_id',$this->user['project_id']); | 79 | $query = $query->where('project_id',$this->user['project_id']); |
| 80 | if (isset($this->map['category_id']) && !empty($this->map['category_id'])) { | 80 | if (isset($this->map['category_id']) && !empty($this->map['category_id'])) { |
| 81 | $str = []; | 81 | $str = []; |
| 82 | + $str[] = $this->map['category_id']; | ||
| 82 | $this->getAllSub($this->map['category_id'],$str); | 83 | $this->getAllSub($this->map['category_id'],$str); |
| 83 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($str, true) . PHP_EOL, FILE_APPEND); | ||
| 84 | $query->where(function ($subQuery) use ($str) { | 84 | $query->where(function ($subQuery) use ($str) { |
| 85 | foreach ($str as $v) { | 85 | foreach ($str as $v) { |
| 86 | $subQuery->orWhereRaw("FIND_IN_SET(?, category_id) > 0", [$v]); | 86 | $subQuery->orWhereRaw("FIND_IN_SET(?, category_id) > 0", [$v]); |
-
请 注册 或 登录 后发表评论