feat: 持久化资料包导出记录与列表摘要

This commit is contained in:
2026-06-04 02:41:49 +08:00
parent 0e49466746
commit ab3d520642
9 changed files with 250 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ from apps.audit.models import AgentAuditLog
from apps.audit.models import NotificationRecord
from apps.chat.models import Conversation
from apps.chat.services import create_conversation_for_batch
from apps.documents.models import SubmissionBatch, UploadedDocument
from apps.documents.models import ExportedDocument, SubmissionBatch, UploadedDocument
def _create_conversation_with_batch():
@@ -547,3 +547,4 @@ def test_chat_export_word_route_persists_real_download_link(client, db, tmp_path
assert "下载导出文件" in content
assert export_report["download_url"] in content
assert AgentAuditLog.objects.filter(conversation_id=conversation.conversation_id).count() == 1
assert ExportedDocument.objects.filter(batch=batch, conversation_id=conversation.conversation_id).count() == 1