diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index 2cd78d7..f56ccbb 100755 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -150,7 +150,7 @@ class StatisticsController extends CommonController public function syncOrderItems(Request $request) { //采用指定时间段订单号 - $model = OrderItems::where(DB::raw("UNIX_TIMESTAMP(`service_date`) >= ".strtotime("2021-06-01"))); + $model = OrderItems::whereNotNull("service_date")->where(DB::raw("UNIX_TIMESTAMP(`service_date`) >= ".strtotime("2021-06-01"))); //采用指定订单号结束 if ($request->last_id) {