refactor(finance): 清理 legacy_platform 的展示与死查询

- 未归一组统计默认渠道补上 third_party_voucher,移除已无数据的 legacy_platform
- 前端移除历史归档/历史平台的类型与标签
- 保留后端口径的 legacy_platform→archived 筛选别名,旧链接不报错
This commit is contained in:
yml2213
2026-11-01 17:32:18 +08:00
parent d80150ff04
commit eb5c18b5b5
8 changed files with 8 additions and 17 deletions
@@ -655,7 +655,9 @@ export async function getAdminChannelMappingDiagnostics(payload: JsonObject = {}
}
}
const modes = channel ? [channel] : ['work_order', 'affiliate_dash', 'legacy_platform', 'manual']
const modes = channel
? [channel]
: ['work_order', 'affiliate_dash', 'third_party_voucher', 'manual']
// 顺序跑:并行会同时扫 cost_exceptions,实测 4 路并发比串行更慢(I/O 争抢)。
const aggregates: Array<{ groupTotal: number; itemTotal: number }> = []
for (const mode of modes) {
@@ -705,7 +707,9 @@ export async function listAdminUnmappedMappingGroups(payload: JsonObject = {}) {
// 分组总数单独算:SQL 守卫禁止窗口函数分页(会在 LIMIT 前消费全部候选行)。
// 按履约方式拆开统计:命中索引,单模式约 90ms;「全部」时顺序跑四种模式。
const modes = channel ? [channel] : ['work_order', 'affiliate_dash', 'legacy_platform', 'manual']
const modes = channel
? [channel]
: ['work_order', 'affiliate_dash', 'third_party_voucher', 'manual']
const totals: Array<{ groupTotal: number; itemTotal: number }> = []
for (const mode of modes) {
const totalParams = [...params, mode]