where('created_at', 'like', '%' . date('Y-m-d') . '%') ->get(); foreach ($appointments as $appointment) { $thirdAppointmentLogs = ThirdAppointmentLog::where('appointment_id', $appointment->id) // 排除掉获取二维码的请求 ->where('url', 'not like', '%GetEmpQrCode%') ->where('finally', 0) ->first(); if ($thirdAppointmentLogs) { $appointment->status = 4; $appointment->save(); } } return self::SUCCESS; } }