功能:新手引导视频 + 美团券首页分页索引 #167

Merged
guke merged 7 commits from fix-homelist into main 2026-07-24 14:48:43 +08:00
Member
No description provided.
zuochenyong added 3 commits 2026-07-24 00:02:10 +08:00
新手引导视频:运营后台上传 MP4(上限 100MB,魔数校验只认 ISO BMFF),
App 端在领券等候浮层前 N 次以引导视频替代广告。新增 guide_video
的 model/schema/repository/router(App 侧 + 后台侧)与播放记录表迁移。

美团券:首页「销量最高 / 智能推荐」两个 tab 改游标分页,配套两条
(city_id, dedup_key, 排序键 DESC) 复合索引,让 Postgres 顺着索引流式
去重,免掉每翻一页重排整城券的开销。美团 CPS client 在 lifespan 预热
并在关闭时释放连接池。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
本分支的 guide_video_play_table 与 main 的 8e04cc13a211 都挂在
(comparison_user_created_idx, monitoring_audit_rbac, notification_table)
这三条线之上,合并 main 后并列成两个 head,`upgrade head` 会直接报
Multiple head revisions。加一个空的 merge 节点收成单 head,不改表结构。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zuochenyong added 3 commits 2026-07-24 12:16:36 +08:00
start_play 无锁 check-then-insert,并发 /start 会算出同一个 seq、各拿一个
play_token 绕过次数上限刷金币;加 (user_id, seq) 唯一键,撞键即降级为不放视频。
grant_play 改成 status='playing'→'granted' 条件更新(compare-and-set),
播完与关闭抢跑/重试只会命中一条,不再二次铸币。含迁移与测试。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
merge origin/main 后 coupon_claim_event(main)与 guide_video_user_seq_uq(本分支)
成两个 head,加 no-op merge 节点 d8dd2106e438 收敛为单 head。已在全新库上
alembic upgrade heads 验证整条链可应用。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
guke added 1 commit 2026-07-24 14:48:32 +08:00
guke merged commit 3f7b5167fa into main 2026-07-24 14:48:43 +08:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WonderableAI/shaguabijia-app-server#167