作者 lyh

gx

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