|
...
|
...
|
@@ -79,8 +79,8 @@ class ProductController extends BaseController |
|
|
|
$query = $query->where('project_id',$this->user['project_id']);
|
|
|
|
if (isset($this->map['category_id']) && !empty($this->map['category_id'])) {
|
|
|
|
$str = [];
|
|
|
|
$str[] = $this->map['category_id'];
|
|
|
|
$this->getAllSub($this->map['category_id'],$str);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($str, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$query->where(function ($subQuery) use ($str) {
|
|
|
|
foreach ($str as $v) {
|
|
|
|
$subQuery->orWhereRaw("FIND_IN_SET(?, category_id) > 0", [$v]);
|
...
|
...
|
|