diff --git a/app/Domains/Company/Http/Controllers/OrderController.php b/app/Domains/Company/Http/Controllers/OrderController.php index bbdc2647..ee8975a0 100644 --- a/app/Domains/Company/Http/Controllers/OrderController.php +++ b/app/Domains/Company/Http/Controllers/OrderController.php @@ -69,12 +69,12 @@ class OrderController extends Controller $order_at = Carbon::parse($res->last()->order_at); $conditions['starttime'] = $order_at->copy()->startOfMonth()->startOfDay()->format('Y-m-d H:i:s'); $conditions['endtime'] = $order_at->copy()->endOfMonth()->endOfDay()->format('Y-m-d H:i:s'); - } else { - $count = $this->orderService->count($conditions); - $count['starttime'] = $conditions['starttime']; - $count['endtime'] = $conditions['endtime']; } - + + $count = $this->orderService->count($conditions); + + $count['starttime'] = $conditions['starttime']; + $count['endtime'] = $conditions['endtime']; return res(['count' => $count, 'orders' => $res], '订单列表', 201); }