mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-09 12:30:49 +08:00
feat(notice): NoticeService 发送核心/场景注册/订阅过滤与站内信驱动及测试
This commit is contained in:
27
extend/base/common/notice/channel/InMailChannel.php
Normal file
27
extend/base/common/notice/channel/InMailChannel.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace base\common\notice\channel;
|
||||
|
||||
use base\common\notice\NoticeChannelInterface;
|
||||
|
||||
/**
|
||||
* 站内信渠道驱动.
|
||||
*
|
||||
* 站内信投递即落库:NoticeService::send() 写 target 行时已置 status=2(成功)、
|
||||
* send_time=当前时间,数据落库即为投递完成,本驱动无需任何外部动作。
|
||||
* 顶栏铃铛/我的消息按 admin_id + channel=inmail 读取行数据呈现;
|
||||
* 消费者(timer 异步投递)永不消费 inmail 行(send 侧直接终态,不入队列)。
|
||||
*/
|
||||
class InMailChannel implements NoticeChannelInterface
|
||||
{
|
||||
public static function name(): string
|
||||
{
|
||||
return 'inmail';
|
||||
}
|
||||
|
||||
public function send(array $target, array $notice): bool
|
||||
{
|
||||
// 站内信投递即落库:send() 阶段已完成写入并置成功终态,此处恒成功。
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user