mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-07 19:40:49 +08:00
21 lines
561 B
PHP
21 lines
561 B
PHP
<?php
|
||
|
||
namespace base\common\event\NoticeSended;
|
||
|
||
use think\facade\Log;
|
||
|
||
class LogEventBase
|
||
{
|
||
public function handle(array $payload)
|
||
{
|
||
// 事件监听处理:payload = [$notice(模型), $targets(投递行数组)](NoticeServiceBase::send trigger 形态)
|
||
[$notice, $targets] = $payload;
|
||
|
||
Log::info('notice sended', [
|
||
'notice_id' => (int) $notice->id,
|
||
'target_count' => count($targets),
|
||
'channels' => array_values(array_unique(array_column($targets, 'channel'))),
|
||
]);
|
||
}
|
||
}
|