作者 赵彬吉

update

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