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

@@ -47,10 +47,10 @@ class NoticeServiceBase
public static function scenes(): array
{
return [
'system' => ['title' => '系统公告', 'channels' => [self::CHANNEL_INMAIL], 'locked' => true],
'common' => ['title' => '通用通知', 'channels' => [self::CHANNEL_INMAIL, self::CHANNEL_EMAIL], 'locked' => false],
'system' => ['title' => '系统公告', 'channels' => [self::CHANNEL_INMAIL], 'locked' => true],
'common' => ['title' => '通用通知', 'channels' => [self::CHANNEL_INMAIL, self::CHANNEL_EMAIL], 'locked' => false],
'admin_login' => ['title' => '登录提醒', 'channels' => [self::CHANNEL_INMAIL, self::CHANNEL_EMAIL], 'locked' => false],
'mall_stock' => ['title' => '库存预警', 'channels' => [self::CHANNEL_INMAIL, self::CHANNEL_EMAIL], 'locked' => false],
'mall_stock' => ['title' => '库存预警', 'channels' => [self::CHANNEL_INMAIL, self::CHANNEL_EMAIL], 'locked' => false],
];
}
@@ -64,8 +64,8 @@ class NoticeServiceBase
{
return [
self::CHANNEL_INMAIL => InMailChannel::class,
self::CHANNEL_EMAIL => EmailChannel::class,
self::CHANNEL_SMS => SmsChannel::class,
self::CHANNEL_EMAIL => EmailChannel::class,
self::CHANNEL_SMS => SmsChannel::class,
self::CHANNEL_WECHAT => WechatChannel::class,
];
}
@@ -117,10 +117,10 @@ class NoticeServiceBase
$now = time();
$notice = SystemNotice::create([
'scene' => $scene,
'title' => $title,
'content' => $content,
'biz_id' => (string) ($options['biz_id'] ?? ''),
'scene' => $scene,
'title' => $title,
'content' => $content,
'biz_id' => (string) ($options['biz_id'] ?? ''),
'send_admin_id' => (int) ($options['send_admin_id'] ?? 0),
]);
$noticeId = (int) $notice->id;
@@ -196,13 +196,13 @@ class NoticeServiceBase
$status = $isInmail ? SystemNoticeTargetBase::STATUS_SUCCESS : SystemNoticeTargetBase::STATUS_PENDING;
$targets[] = [
'notice_id' => $noticeId,
'admin_id' => $adminId,
'channel' => $channel,
'notice_id' => $noticeId,
'admin_id' => $adminId,
'channel' => $channel,
'target_addr' => $targetAddr,
'status' => $status,
'send_time' => $isInmail ? $now : 0,
'read_time' => 0,
'status' => $status,
'send_time' => $isInmail ? $now : 0,
'read_time' => 0,
'create_time' => $now,
'update_time' => $now,
];