1.0 KiB
1.0 KiB
2026-10-21 | 短剧保存免费集数同步分集
目标
后台短剧编辑改 freeEpisodes / unlockCoin 后,同步 drama_episode.is_free / unlock_coin,与定价页 PriceService.save() 规则一致。
方案
- 抽出
EpisodePriceSync.syncByDramaRule(dramaId, freeEpisodes, unlockCoin),供DramaService.update与PriceService.save共用。 DramaService.update在updateById后,仅当免费集数或解锁金币相对更新前有变化时调用同步。- TDD:先写
DramaServiceTest复现失败,再改实现转绿。
范围
- 仅
fruitshorts-module-content - 不改 Controller / VO / 契约 / 前端
门禁
mvn -pl fruitshorts-module-content test -Dtest=DramaServiceTest
mvn -pl fruitshorts-module-content test
分支 / 提交
feature/drama-free-episodes-sync←developtest(content): 覆盖短剧免费集数同步分集价格fix(content): 短剧保存免费集数时同步分集免费状态merge --no-ff回 develop 并 push