设置默认时间限制

This commit is contained in:
liu 2024-03-13 14:24:48 +08:00
parent aef647d6df
commit 0fb79059ba

View File

@ -68,6 +68,11 @@ class StoreOrder extends BaseController
[$page, $limit] = $this->getPage(); [$page, $limit] = $this->getPage();
$where['section_startTime'] = $this->request->param('section_startTime'); $where['section_startTime'] = $this->request->param('section_startTime');
$where['section_endTime'] = $this->request->param('section_endTime'); $where['section_endTime'] = $this->request->param('section_endTime');
if(empty($where['section_startTime']) && empty($where['section_endTime'])){
$where['section_startTime'] = date('Y-m-d',time()).' 00:00:00';
$where['section_endTime'] = date('Y-m-d',time()).' 23:59:59';
}
return app('json')->success($repository->revenueExpenditure($where, $page, $limit,$merId)); return app('json')->success($repository->revenueExpenditure($where, $page, $limit,$merId));
} }