3 Commits

Author SHA1 Message Date
iven
271f0c4f29 test(diary): 添加 9 个集成测试 + 修复 mood_stats 表名
Some checks failed
Main Merge / backend (push) Has been cancelled
Main Merge / frontend (push) Has been cancelled
集成测试 (TestDb + Service 层直接调用):
- test_journal_crud_full_lifecycle: 创建/查询/更新/列表/软删除全流程
- test_journal_version_conflict_on_update: 乐观锁版本冲突检测
- test_journal_tenant_isolation: 多租户数据隔离验证
- test_class_create_and_join: 班级创建+学生加入+成员查询+班级码重置
- test_sync_batch_create_and_fetch: 批量创建 3 篇日记同步
- test_sync_version_conflict_detection: 同步版本冲突检测
- test_mood_stats_aggregation: 心情统计 GROUP BY 聚合
- test_parent_binding_two_step_verification: 家长绑定两步验证
- test_achievement_list: 成就查询

修复:
- mood_stats_service: journal_entry → journal_entries 表名修正

测试: 518/518 全仓库通过 (含 9 新增集成测试)
2026-06-03 18:04:58 +08:00
iven
749ef55b89 feat: Week 4 收尾 + 架构治理 — 搜索/家长中心/Feature Flag/Docker/环境配置
Some checks failed
Main Merge / backend (push) Has been cancelled
Main Merge / frontend (push) Has been cancelled
架构治理:
- Feature Flag 落地: Cargo.toml [features] default=["diary"] + main.rs cfg 条件编译
- 环境配置统一: AppConfig 类 + --dart-define 注入 + SSE 端口 8080→3000 修复

搜索替代方案 (无 FTS):
- SearchBloc + 标签/心情筛选接入后端 API
- JournalRepository 扩展 mood/tag 筛选参数
- 搜索页 UI 接入实际数据(替换占位文本)

家长中心最小集 (PIPL 合规):
- 后端: parent_service (绑定/查看/导出/删除/解绑) + parent_handler (6 个 API 端点)
- 前端: ParentBloc + ParentPage 功能完整实现
- 绑定孩子、只读查看日记、导出数据、删除数据、解绑

Docker 部署:
- verify.sh 健康检查脚本 (Axum/PG/Redis/OpenAPI 四项检查)

测试修复:
- home_bloc_test / calendar_bloc_test 适配 JournalRepository 新参数

验证: flutter test 84/84 pass, cargo test 76/76 pass, cargo check pass
2026-06-01 23:53:34 +08:00
iven
c539e6fd83 feat: initialize Nuanji (Warm Notes) project
- Base platform from base.git (ERP base: auth, core, config, message, workflow, plugin)
- Created erp-diary module skeleton (lib.rs, dto.rs, error.rs, event.rs, state.rs)
- Integrated erp-diary into workspace and erp-server
- Added DiaryModule registration in main.rs
- Added DiaryState FromRef in state.rs
- Diary routes mounted (empty routes, ready for implementation)
- Product design spec v1.2 preserved in docs/
- Implementation plan preserved in plans/

Cargo check: OK
Cargo test: OK (78+ base tests passing)
2026-05-31 20:52:19 +08:00