appointmentModel = $appointmentModel; $this->appointmentConfig = $AppointmentConfig; } /** * Execute the job. * * @return void */ public function handle() { // 预约门禁 $result = (new Appointment())->appointDoor($this->appointmentModel, $this->appointmentConfig); if ($result) { // 成功预约会议室 $result = (new Appointment())->appointMeet($this->appointmentModel, $this->appointmentConfig); } if ($result) { // 门禁会议预约成功,预约车牌 Appointment::sendAppoinCar($this->appointmentModel); // 预约成功 $this->appointmentModel->status = 1; } else { // 预约失败 $this->appointmentModel->status = 4; } $this->appointmentModel->save(); } }