feat(ad-revenue): 收益报表 DAU/ARPU 按所选区间统计(复用大盘活跃口径) #120

Merged
marco merged 1 commits from feat/ad-report-period-dau-arpu into main 2026-07-06 00:23:37 +08:00
Member
  • 抽出 stats.period_active_dau(date_from, date_to):任意北京自然日区间的去重活跃用户
    (登录 + 开始比价 + 开始领券),口径与数据大盘 period.users.active 一致。today_dau 与
    dashboard_overview 的 period 活跃、逐日趋势统一复用它,消除三处重复的并集计算,行为不变。
  • ad_revenue_report 去掉「仅今日单天才给 dau」的 is_today 限制,dau 改为按 date_from~date_to
    区间统计(含今日、近 7 天、近 30 天);ARPU = 区间预估收益 ÷ 区间活跃用户 对三个时段均可算,
    dau 与大盘同区间同值。
  • dau 为全局口径,不随 user_id/ad_type/feed_scene/app_env 筛选变化;更新 schema 字段说明。
  • 验证:admin 读接口测试(含 dashboard_overview)全过;实测多天区间 dau 非空且 == 大盘
    period.users.active。前端展示改动见 admin-web 对应 PR。

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

- 抽出 stats.period_active_dau(date_from, date_to):任意北京自然日区间的去重活跃用户 (登录 + 开始比价 + 开始领券),口径与数据大盘 period.users.active 一致。today_dau 与 dashboard_overview 的 period 活跃、逐日趋势统一复用它,消除三处重复的并集计算,行为不变。 - ad_revenue_report 去掉「仅今日单天才给 dau」的 is_today 限制,dau 改为按 date_from~date_to 区间统计(含今日、近 7 天、近 30 天);ARPU = 区间预估收益 ÷ 区间活跃用户 对三个时段均可算, dau 与大盘同区间同值。 - dau 为全局口径,不随 user_id/ad_type/feed_scene/app_env 筛选变化;更新 schema 字段说明。 - 验证:admin 读接口测试(含 dashboard_overview)全过;实测多天区间 dau 非空且 == 大盘 period.users.active。前端展示改动见 admin-web 对应 PR。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
zhuzihao added 1 commit 2026-07-05 21:45:20 +08:00
- 抽出 stats.period_active_dau(date_from, date_to):任意北京自然日区间的去重活跃用户
  (登录 + 开始比价 + 开始领券),口径与数据大盘 period.users.active 一致。today_dau 与
  dashboard_overview 的 period 活跃、逐日趋势统一复用它,消除三处重复的并集计算,行为不变。
- ad_revenue_report 去掉「仅今日单天才给 dau」的 is_today 限制,dau 改为按 date_from~date_to
  区间统计(含今日、近 7 天、近 30 天);ARPU = 区间预估收益 ÷ 区间活跃用户 对三个时段均可算,
  dau 与大盘同区间同值。
- dau 为全局口径,不随 user_id/ad_type/feed_scene/app_env 筛选变化;更新 schema 字段说明。
- 验证:admin 读接口测试(含 dashboard_overview)全过;实测多天区间 dau 非空且 == 大盘
  period.users.active。前端展示改动见 admin-web 对应 PR。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
marco merged commit 982e92bc24 into main 2026-07-06 00:23:37 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WonderableAI/shaguabijia-app-server#120