作者 lyh

gx

@@ -143,8 +143,7 @@ class ProductController extends BaseController @@ -143,8 +143,7 @@ class ProductController extends BaseController
143 $query = $query->where('status',$this->map['status']); 143 $query = $query->where('status',$this->map['status']);
144 } 144 }
145 if(!empty($this->param['start_at']) && !empty($this->param['end_at'])){ 145 if(!empty($this->param['start_at']) && !empty($this->param['end_at'])){
146 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($this->param, true) . PHP_EOL, FILE_APPEND);  
147 - $query->whereBetween('created_at', [$this->param['start_at'].' 00:00:00',$this->param['end_at'].' 59:59:59']); 146 + $query->where('created_at', '>=' ,$this->param['start_at'].' 00:00:00')->where('created_at', '<=' ,$this->param['end_at'].' 59:59:59');
148 } 147 }
149 return $query; 148 return $query;
150 } 149 }