作者 赵彬吉

update

@@ -29,7 +29,8 @@ class ProductController extends BaseController @@ -29,7 +29,8 @@ class ProductController extends BaseController
29 $map[] = ['title', 'like', "%{$this->param['search']}%"]; 29 $map[] = ['title', 'like', "%{$this->param['search']}%"];
30 } 30 }
31 if(!empty($this->param['created_at'][0]) && !empty($this->param['created_at'][1])){ 31 if(!empty($this->param['created_at'][0]) && !empty($this->param['created_at'][1])){
32 - $map[] = ['created_at', 'between', $this->param['created_at']]; 32 + $map[] = ['created_at', '>=', $this->param['created_at'][0] . ' 00:00:00'];
  33 + $map[] = ['created_at', '<=', $this->param['created_at'][1] . ' 59:59:59'];
33 } 34 }
34 if(!empty($this->param['category_id'])){ 35 if(!empty($this->param['category_id'])){
35 $ids = CategoryRelated::where('cate_id', $this->param['category_id'])->pluck('product_id')->toArray(); 36 $ids = CategoryRelated::where('cate_id', $this->param['category_id'])->pluck('product_id')->toArray();