作者 lyh

gx

... ... @@ -114,6 +114,9 @@ class ProductController extends BaseController
$str[] = $this->map['category_id'];
$str = $this->getAllSub($this->map['category_id'],$str);
$productArr = CategoryRelated::whereIn('cate_id',$str)->pluck('product_id')->toArray();
if($this->user['project_id'] == '475'){
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($productArr, true) . PHP_EOL, FILE_APPEND);
}
$query->whereIn('id',$productArr);
}
if(isset($this->map['title']) && !empty($this->map['title'])){
... ...
... ... @@ -70,6 +70,7 @@ class Category extends Base
$str[] = $cate_id;
$cate_ids = $this->getAllSub($cate_id,$str);
$count = CategoryRelated::whereIn('cate_id',$cate_ids)->count();
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($cate_ids, true) . PHP_EOL, FILE_APPEND);
// $str = 0;
return $count;
}
... ...