|
|
@@ -44,6 +44,7 @@ class SendEmailJobs implements ShouldQueue
|
|
|
$EmailVerifyCode = new EmailVerifyCode();
|
|
|
$SubNoticeLogModel = new SubNoticeLogModel();
|
|
|
$notice_data_info = $this->message_data['notice_data_info'];
|
|
|
+
|
|
|
|
|
|
$email_to = $notice_data_info['email'];
|
|
|
$email_content = json_decode($notice_data_info['email_content'], true);
|
|
|
@@ -51,7 +52,9 @@ class SendEmailJobs implements ShouldQueue
|
|
|
$email_content = $email_content['content'];
|
|
|
$res_msg = $EmailVerifyCode->sendSmtpEmail($email_to, $email_title, $email_content);
|
|
|
Log::info('job_send_email', '订阅邮件通知推送队列记录', ['email' => $email_to, 'email_content' => $email_content, 'msg' => $res_msg]);
|
|
|
- $SubNoticeLogModel->where(['id' => $notice_data_info['id']])->update(['email_status' => 0]);
|
|
|
+ if(isset($notice_data_info['id'])){
|
|
|
+ $SubNoticeLogModel->where(['id' => $notice_data_info['id']])->update(['email_status' => 0]);
|
|
|
+ }
|
|
|
} catch (\Exception $e) {
|
|
|
Log::info('job_send_email', '发送邮件通知队列失败', ['data' => $this->message_data, 'error' => $e->getMessage()]);
|
|
|
}
|