feat(admin/ad): 提现自动对账后台开关 + 客户端广告 flags 端点 + 穿山甲多 m-key 验签 #60

Open
Ghost wants to merge 7 commits from feat/feed-ad-realcoin-orb into main
No description provided.
Ghost added 6 commits 2026-06-17 22:37:45 +08:00
- 自动对账接入 app_config 运行时配置(新增 bool 配置类型):env 部署总闸 + DB 运营日常开关
  双层;worker 每轮读 DB 即时生效,健康检查改报「env AND DB」实际生效态
- 新增 GET /api/v1/platform/flags(不鉴权)下发 comparing_ad_enabled 远程 kill-switch,
  客户端拉取后缓存;空库回退默认 True
- 穿山甲发奖回调支持多激励位 m-key(三命名项 PANGLE_REWARD_SECRET_TEST/_DEDICATED/_PROD
  + 旧逗号分隔合并去重),verify_callback_sign_any 逐个验签任一通过即受理;向后兼容旧单 key
- 补 test_platform / bool config 用例;app_config 文档同步

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ad-pangle-callback / integrations/pangle: 文档改为 verify_callback_sign_any
  + 命名变量 PANGLE_REWARD_SECRET_TEST/_TEST_DEDICATED/_PROD(多激励位共用同一回调 URL)
- 看广告赚金币上线清单: 记录 2026-06-16 实测穿山甲打线上 errorCode=50002 超时
  (头号上线阻塞,m-key 配对也救不了)+ 生产 .env 命名变量配置 + AD_REWARD_TEST_GRANT 红线

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- compute_feed_reward/preview_feed_reward: 逐条 (eCPM,秒) 跨条进位、每满 10s 一份、
  每份用所在段 eCPM × LT,封顶 12 份/场;发奖与预览同一口径
- grant_feed_reward 改收 segments(旧 ecpm/duration 单段自动回退,兼容旧客户端)
- 新增 POST /api/v1/ad/feed-reward/preview(只读不入账,给比价金币小球实时显示真实即将到账额)
- schemas 加 FeedSegmentIn/FeedPreviewIn/FeedPreviewOut;docs/api 补 preview 文档 + 更新 feed-reward
- tests: 按条结算/12份封顶/aborted/preview==grant 等 6 个用例

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
随本分支一并提交的工作区既有改动(非本次信息流发奖功能):
batch_alter_table + 按方言区分 server_default,让迁移在 SQLite 本地也能跑。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Ghost added 1 commit 2026-06-17 22:40:14 +08:00
Checking for merge conflicts…
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/feed-ad-realcoin-orb:feat/feed-ad-realcoin-orb
git checkout feat/feed-ad-realcoin-orb
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#60