fix(content): 短剧保存时始终同步分集价格
This commit is contained in:
1 parent
8bb7f63c62
commit
9adf8c5630
4 files changed
+52
-15
No files matched your search
@@ -0,0 +1,24 @@
|
||||
# 2026-10-21 | 短剧保存始终同步分集价格(幂等纠偏)
|
||||
|
||||
## 背景
|
||||
|
||||
承接 K104。短剧 `free_episodes=9` 重存后,分集 5~9 仍收费。
|
||||
|
||||
## 根因
|
||||
|
||||
`DramaService.update()` 仅在 `freeEpisodes` / `unlockCoin` 相对更新前有变化时调用 `EpisodePriceSync`。历史数据已漂移时,同值重存不触发同步。
|
||||
|
||||
## 方案
|
||||
|
||||
1. 测试:覆盖「规则字段未变、分集已漂移」仍纠正。
|
||||
2. `DramaService.update()`:每次保存都调用 `EpisodePriceSync.syncByDramaRule(drama)`。
|
||||
3. `EpisodePriceSync`:仅对有差异的行走 `updateById`(已具备,保持)。
|
||||
|
||||
## 范围
|
||||
|
||||
只改 `fruitshorts-module-content` 的 `DramaService` / `EpisodePriceSync` / `DramaServiceTest`。不改 Controller / VO / 契约 / 前端。
|
||||
|
||||
## 提交
|
||||
|
||||
1. `test(content): 覆盖免费集数未变但分集漂移的修复场景`
|
||||
2. `fix(content): 短剧保存时始终同步分集价格`
|
||||
@@ -24633,3 +24633,18 @@ $ git push origin develop
|
||||
```
|
||||
|
||||
解读:作者 Zhou Weidong;无 Co-authored-by / AI 痕迹;develop 与 feature 均已 push。未启动/重启 8080/8081。停住等验收。
|
||||
|
||||
---
|
||||
|
||||
## 2026-10-21 短剧保存始终同步分集价格
|
||||
|
||||
计划:`docs/plans/2026-10-21-drama-price-sync-idempotent.md`。
|
||||
同值重存也调用 `EpisodePriceSync.syncByDramaRule(drama)`,只更新有差异的分集。
|
||||
|
||||
```
|
||||
$ mvn -pl fruitshorts-module-content -am test -Dtest=DramaServiceTest -Dsurefire.failIfNoSpecifiedTests=false
|
||||
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.184 s -- in com.fruitshorts.content.service.DramaServiceTest
|
||||
[INFO] BUILD SUCCESS
|
||||
```
|
||||
|
||||
解读:新增「规则未变但分集漂移」用例;原「已对齐则不写库」仍通过,但会查询分集。
|
||||
Reference in new issue
Block a user