feat(ad-audit): 新增看广告金币审计页 (#4)

- /ad-audit 复算对账页:公式快照 + reward_video/feed 发奖明细 + 实发与复算一致性校验
- 侧栏新增「金币审计」导航
- types 增加 AdCoinAuditRow / AdCoinFormula / AdCoinAudit

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: OuYingJun1024 <1034284404@qq.com>
Reviewed-on: #4
Co-authored-by: ouzhou <ouzhou@wonderable.ai>
Co-committed-by: ouzhou <ouzhou@wonderable.ai>
This commit was merged in pull request #4.
This commit is contained in:
ouzhou
2026-06-10 16:07:52 +08:00
committed by marco
parent 6766fe8c10
commit 8c7e2b0220
3 changed files with 264 additions and 0 deletions
+35
View File
@@ -180,6 +180,41 @@ export interface AuditLog {
created_at: string;
}
export interface AdCoinAuditRow {
scene: string; // reward_video / feed
record_id: number;
user_id: number;
created_at: string;
status: string; // granted / capped / ecpm_missing
ecpm: string | null;
ecpm_factor: number | null;
units: number;
lt_index_start: number | null;
lt_index_end: number | null;
lt_factor_start: number | null;
lt_factor_end: number | null;
expected_coin: number;
actual_coin: number;
matched: boolean;
}
export interface AdCoinFormula {
description: string;
coin_per_yuan: number;
ecpm_unit: string;
feed_unit_seconds: number;
ecpm_factor_tiers: [number, number, number | null][];
lt_factor_tiers: [number, number, number | null][];
}
export interface AdCoinAudit {
date: string;
formula: AdCoinFormula;
total: number;
mismatch_count: number;
items: AdCoinAuditRow[];
}
export interface DashboardOverview {
users: {
total: number;