feat(backend): F1-6 sprint2 #2 累计消费总额加入 sandbox_replay
新增指标(无 fdw_queries 原查询 + 0 现有调用方 + 无 thin wrapper),沿用 sprint 1/sprint2 #1 模式 @trace_service + @runtime_aware decorator + 显式 stat_date <= ctx.business_date 上界 + dws_member_consumption_summary .total_consume_amount 字段 items_sum 口径。 双口径数值验证 PASS(member=2799207087163141 黄先生,直接 Python 调用): - 4a live(today=2026-05-05): get_total_consume_amount=1252.65 - 4b sandbox=2026-04-20: get_total_consume_amount=999.99(walkthrough 测试快照) unit test sprint1+sprint2 累计 19/19 PASS,无回归。 记录 thin wrapper 决策原则到 spec §5.5(迁移辅助层,非常态架构; fdw_queries 长远退化纯 ETL 物理访问层,清理放收尾 sprint)。 注:#3 累计交易笔数因 spec §4 字段未明确(dws_order_summary vs total_visit_count)暂停,等 Neo 决断后继续。 详见 docs/audit/changes/2026-05-06__f1_6_sprint2_total_consume_amount.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -35,10 +35,12 @@ from app.services.sandbox_replay._decorator import runtime_aware
|
||||
from app.services.sandbox_replay.consumption_replay import (
|
||||
get_consumption_60d as get_consumption_60d_replay,
|
||||
get_last_visit_days as get_last_visit_days_replay,
|
||||
get_total_consume_amount as get_total_consume_amount_replay,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"runtime_aware",
|
||||
"get_last_visit_days_replay",
|
||||
"get_consumption_60d_replay",
|
||||
"get_total_consume_amount_replay",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user