diff --git a/api/prisma/migrations/20260714101500_mark_legacy_report_record_sources/migration.sql b/api/prisma/migrations/20260714101500_mark_legacy_report_record_sources/migration.sql new file mode 100644 index 0000000..3ef2d1e --- /dev/null +++ b/api/prisma/migrations/20260714101500_mark_legacy_report_record_sources/migration.sql @@ -0,0 +1,4 @@ +UPDATE "ChannelSignatureReportRecord" +SET "sourceEntry" = 'legacy' +WHERE "action" = 'manual_status_change' + AND "sourceEntry" = 'system'; diff --git a/docs/testing-progress.md b/docs/testing-progress.md index 1517909..144adce 100644 --- a/docs/testing-progress.md +++ b/docs/testing-progress.md @@ -1694,5 +1694,6 @@ git diff --check - 企业模板管理将企业名称、企业应用、模板名称、模板内容拆成独立查询参数;企业签名管理拆分企业名称、企业应用、签名名称/用途和引流信息。引流信息查询命中后按签名父级分组,并只展开显示命中的站点、URL 或备注。 - 企业应用管理新增应用名称和状态条件;企业黑名单搜索区重做为企业名称、企业应用、手机号码、入库原因、状态五个独立条件。上述条件均由 NestJS 接收并通过 Prisma AND 组合查询真实 PostgreSQL,不再拼接为单个模糊关键字。 - `ChannelSignatureReportRecord` 新增 `sourceEntry`,企业签名、报备任务、通道报备详情三个入口分别持久化 `enterprise_signature/report_task/channel_report`。报备记录列表展示真实通道名称、签名或引流信息主体、完整主体内容、中文动作和状态变化,并将入口翻译为“企业签名修改 / 报备任务修改 / 通道信息修改”。 +- 历史 `manual_status_change` 记录无法从旧数据可靠反推出入口,迁移统一标记为 `legacy`,页面显示“历史记录(入口未记录)”,不得误标为系统自动处理或猜测入口。 - 充值记录、短信记录表头统一左对齐;搜索区使用自适应网格,增加条件后不挤压操作按钮。 - 本地真实 PostgreSQL 已应用 `20260714100000_add_report_record_source_entry`,并通过编译后的 NestJS 服务对现有应用、签名、模板执行真实组合查询。API 全量测试 13 suites、141 项通过;Prisma validate、API build、前端 build、Gateway 测试和 `git diff --check` 通过。应用内浏览器确认真实鉴权跳转、页面标题、非空 DOM、无框架错误覆盖及 console 无 error/warn;因图形验证码未获授权代解,登录后页面点击验收未执行。 diff --git a/src/api/adminApi.ts b/src/api/adminApi.ts index 35ac880..9e80152 100644 --- a/src/api/adminApi.ts +++ b/src/api/adminApi.ts @@ -577,7 +577,7 @@ export type ReportRecord = DictionaryItem & { statusBefore?: string | null; statusAfter?: string | null; reason?: string | null; - sourceEntry?: 'system' | 'enterprise_signature' | 'report_task' | 'channel_report'; + sourceEntry?: 'system' | 'legacy' | 'enterprise_signature' | 'report_task' | 'channel_report'; channel?: AdminChannel; task?: ReportTask; }; diff --git a/src/apps/admin/AdminReportRecordsPage.tsx b/src/apps/admin/AdminReportRecordsPage.tsx index f6f9ff1..77788d8 100644 --- a/src/apps/admin/AdminReportRecordsPage.tsx +++ b/src/apps/admin/AdminReportRecordsPage.tsx @@ -25,7 +25,7 @@ const actionLabel: Record = { }; const sourceEntryLabel: Record = { - enterprise_signature: '企业签名修改', report_task: '报备任务修改', channel_report: '通道信息修改', system: '系统自动处理', + enterprise_signature: '企业签名修改', report_task: '报备任务修改', channel_report: '通道信息修改', system: '系统自动处理', legacy: '历史记录(入口未记录)', }; function translateStatus(value?: string | null) {