weizong song 5 years ago
parent 2a95683fbf
commit 9db065691a

@ -149,6 +149,7 @@ class StatisticsController extends CommonController
public function syncOrderItems(Request $request)
{
DB::enableQueryLog();
//采用指定时间段订单号
$model = OrderItems::whereNotNull("service_date")->where(DB::raw("UNIX_TIMESTAMP(`service_date`) >= ".strtotime("2021-06-01")));
//采用指定订单号结束
@ -157,7 +158,7 @@ class StatisticsController extends CommonController
$model = $model->where("id", ">", $request->last_id);
}
$orderItems = $model->with("order")->limit(20)->get();
dd($orderItems->toArray());
dd(DB::getQueryLog(),$orderItems->toArray());
if (!$orderItems->count()) {
dd("已处理完毕");

Loading…
Cancel
Save