refactor: 收口 V3 分层架构与插件兼容边界

This commit is contained in:
jxxghp
2026-08-18 13:22:02 +08:00
parent cca99bd421
commit 8472bcff43
274 changed files with 10730 additions and 6130 deletions
+4 -2
View File
@@ -10,7 +10,7 @@ from app.db import AsyncSessionFactory, SessionFactory
from app.db.oper.message import MessageOper
from app.db.models.message import Message as MessageModel
from app.db.oper.systemconfig import SystemConfigOper
from app.application.messaging.message import MessageHelper
from app.application.messaging.message import MessageHelper, MessageQueryService
from app.schemas import Message, MessageClearScope
from app.schemas.types import MediaType, MessageType, SystemConfigKey
@@ -107,7 +107,9 @@ def test_notification_clear_marker_filters_history_across_requests() -> None:
通过异步接口读取通知标题。
"""
async with AsyncSessionFactory() as db:
messages = await get_notification_message(db=db)
messages = await get_notification_message(
service=MessageQueryService(MessageOper(db))
)
return [message.title for message in messages]
assert asyncio.run(_load_titles()) == ["新媒体通知", "旧系统通知"]