diff --git a/packages/bydauto/src/Commands/BYDAutoCommand.php b/packages/bydauto/src/Commands/BYDAutoCommand.php index 76b3b90..e878a6c 100644 --- a/packages/bydauto/src/Commands/BYDAutoCommand.php +++ b/packages/bydauto/src/Commands/BYDAutoCommand.php @@ -27,9 +27,6 @@ public function handle() } } - // public function action_contact() - // {} - public function action_mail_test() { $users = Contact::query()->get(); @@ -69,7 +66,7 @@ public function action_push_missing() continue; } $contact = $contacts[$offset]; - // $item->update(['status' => Testdrive::STATUS_PUBLISHED, 'contact_id' => $contact->id, 'contact_info' => $contact->toArray()]); + $item->update(['status' => Testdrive::STATUS_PUBLISHED, 'contact_id' => $contact->id, 'contact_info' => $contact->toArray()]); if (!isset($sendList[$contact->id])) { $sendList[$contact->id] = [$item]; } else { @@ -83,7 +80,7 @@ public function action_push_missing() $contact = $contacts->firstWhere('id', $contactId); $this->info("发送试驾数据给联系人 {$contact->id} 总数 " . count($items)); info("发送试驾数据给联系人 {$contact->id} 总数 " . count($items)); - // $contact->notify(new TestdirveNotification($items)); + $contact->notify(new TestdirveNotification($items)); } return Command::SUCCESS; } diff --git a/packages/bydauto/src/Notifications/TestdirveNotification.php b/packages/bydauto/src/Notifications/TestdirveNotification.php index 98d26b7..9e0cb93 100644 --- a/packages/bydauto/src/Notifications/TestdirveNotification.php +++ b/packages/bydauto/src/Notifications/TestdirveNotification.php @@ -20,6 +20,7 @@ public function via(object $notifiable): array public function toMail(object $notifiable): MailMessage { + info('===== TestdirveNotification::toMail', ['items' => $this->items]); $table = new HtmlString(view('bydauto::mail.testdrive', ['items' => $this->items])->render()); return (new MailMessage()) ->subject("预约试驾线索通知")