chore(notice): 规范修复与安装演练收尾

This commit is contained in:
augushong
2026-10-12 13:40:40 +00:00
parent 3b6cb66549
commit a756b8a1cd
23 changed files with 978 additions and 981 deletions

View File

@@ -29,15 +29,15 @@ class EmailChannel implements NoticeChannelInterface
throw new RuntimeException('邮件发送失败: 渠道未启用(notify_email_enable != 1)');
}
$host = (string) sysconfig('notify', 'notify_smtp_host');
$port = (int) sysconfig('notify', 'notify_smtp_port');
$secure = strtolower((string) sysconfig('notify', 'notify_smtp_secure'));
$user = (string) sysconfig('notify', 'notify_smtp_user');
$pass = (string) sysconfig('notify', 'notify_smtp_pass');
$from = (string) sysconfig('notify', 'notify_smtp_from', 'notice@localhost');
$host = (string) sysconfig('notify', 'notify_smtp_host');
$port = (int) sysconfig('notify', 'notify_smtp_port');
$secure = strtolower((string) sysconfig('notify', 'notify_smtp_secure'));
$user = (string) sysconfig('notify', 'notify_smtp_user');
$pass = (string) sysconfig('notify', 'notify_smtp_pass');
$from = (string) sysconfig('notify', 'notify_smtp_from', 'notice@localhost');
$fromName = (string) sysconfig('notify', 'notify_smtp_from_name');
$title = (string) ($notice['title'] ?? '');
$title = (string) ($notice['title'] ?? '');
$content = (string) ($notice['content'] ?? '');
$mailer = new PHPMailer(true);

View File

@@ -34,11 +34,11 @@ class SmsChannel implements NoticeChannelInterface
// 骨架驱动模拟发送:开关状态仅记入日志(关闭也恒成功),不拦截投递、不真实外呼
$enabled = (int) sysconfig('notify', 'notify_sms_enable');
Log::info('notice sms channel skeleton simulated send', [
'channel' => self::name(),
'enabled' => $enabled,
'notice_id' => $notice['id'] ?? 0,
'channel' => self::name(),
'enabled' => $enabled,
'notice_id' => $notice['id'] ?? 0,
'target_addr' => $target['target_addr'] ?? '',
'title' => $notice['title'] ?? '',
'title' => $notice['title'] ?? '',
]);
return true;

View File

@@ -34,11 +34,11 @@ class WechatChannel implements NoticeChannelInterface
// 骨架驱动模拟发送:开关状态仅记入日志(关闭也恒成功),不拦截投递、不真实外呼
$enabled = (int) sysconfig('notify', 'notify_wechat_enable');
Log::info('notice wechat channel skeleton simulated send', [
'channel' => self::name(),
'enabled' => $enabled,
'notice_id' => $notice['id'] ?? 0,
'channel' => self::name(),
'enabled' => $enabled,
'notice_id' => $notice['id'] ?? 0,
'target_addr' => $target['target_addr'] ?? '',
'title' => $notice['title'] ?? '',
'title' => $notice['title'] ?? '',
]);
return true;