feat(content): 列表卡片与后台返回收藏点赞评论数
This commit is contained in:
1 parent
f90336963b
commit
256821b824
13 files changed
+324
-50
No files matched your search
@@ -22884,3 +22884,31 @@ Running Gradle task 'assembleDebug'...
|
||||
```
|
||||
|
||||
解读:静态检查零告警,490 条测试全部通过,debug APK 构建成功。真机验收由用户执行。
|
||||
|
||||
## 2026-10-21 FruitServer:K84-A 列表卡片与后台补充互动计数
|
||||
|
||||
- 前置状态:K83-A 文档留痕完成,FruitServer develop 提交 `f903369`。
|
||||
- 分支:`feat/drama-card-counts`
|
||||
- `AppDramaCardVO` 新增 `likeCount` / `favoriteCount` / `commentCount`,首页、发现、分类、收藏、搜索等复用卡片的接口统一返回三个字段。
|
||||
- `AppCatalogService.cards()` 对每批卡片只调用一次 `CommentService.countByDramas(ids)`,点赞/收藏取 `Drama` 实体冗余字段,评论缺失时回填 0,避免逐条查询。
|
||||
- `CommentService` 新增按 `drama_id` 分组批量统计,过滤逻辑删除与 `status = 'deleted'`,空集合不查询数据库。
|
||||
- 后台 `DramaRespVO` 新增三个字段;`module-content` 只填点赞/收藏,`admin-api` 的分页和详情接口从 `module-interaction` 批量回填评论数,模块依赖方向保持不变。
|
||||
- `docs/api-phase1.md` 已同步卡片互动计数契约;未修改 Flutter 客户端、specs 仓库或其它业务逻辑。
|
||||
- 测试覆盖列表卡片三个字段契约、单次批量查询、空集合、多剧分组统计,以及后台分页/详情三个字段回填。
|
||||
|
||||
门禁说明:本机默认 JDK 27 不兼容既有 Mockito inline 测试,首次尝试在既有 commerce 模块失败;按项目要求固定 JDK 21 后完整重跑通过。
|
||||
|
||||
门禁原始输出:
|
||||
|
||||
```text
|
||||
$ JAVA_HOME=/opt/homebrew/Cellar/openjdk@21/21.0.12.1/libexec/openjdk.jdk/Contents/Home mvn test
|
||||
[INFO] Reactor Summary for fruitshorts 1.0.0-SNAPSHOT:
|
||||
[INFO] fruitshorts-module-interaction ..................... SUCCESS
|
||||
[INFO] fruitshorts-admin-api ............................... SUCCESS
|
||||
[INFO] fruitshorts-app-api ................................. SUCCESS
|
||||
[INFO] fruitshorts-transcode-worker ........................ SUCCESS
|
||||
[INFO] BUILD SUCCESS
|
||||
[INFO] Total time: 14.294 s
|
||||
```
|
||||
|
||||
解读:JDK 21 下完整 Maven 测试通过,App/Admin 互动计数契约与既有模块测试均保持绿色。接口联调验收由用户执行。
|
||||
Reference in new issue
Block a user