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

@@ -17,7 +17,7 @@ class NoticeEventBase
}
// 不传 channels=按场景注册渠道展开(admin_login=[inmail,email]),再经各管理员订阅矩阵过滤
NoticeService::send([$admin->id], '登录提醒', "账号 {$admin->username} 于 ".date('Y-m-d H:i').' 登录成功', ['scene' => 'admin_login']);
NoticeService::send([$admin->id], '登录提醒', "账号 {$admin->username} 于 " . date('Y-m-d H:i') . ' 登录成功', ['scene' => 'admin_login']);
} catch (\Throwable $e) {
// 通知失败不得影响登录主流程
Log::error('admin login notice failed: ' . $e->getMessage());

View File

@@ -12,9 +12,9 @@ class LogEventBase
[$notice, $targets] = $payload;
Log::info('notice sended', [
'notice_id' => (int) $notice->id,
'notice_id' => (int) $notice->id,
'target_count' => count($targets),
'channels' => array_values(array_unique(array_column($targets, 'channel'))),
'channels' => array_values(array_unique(array_column($targets, 'channel'))),
]);
}
}