Codex
|
3244e02e7e
|
refactor(api): 关系/匹配域采用 2026-09-14 canonical 路径,消除三代并存
## 问题:同一能力存在三代路径,前端指向的是已废止的一代
按 mtime 排查后发现"最新"并非上一轮以为的 /relations/*,而是 2026-09-14 的 match 模块:
| 代际 | 位置 | 日期 | 路径 |
|---|---|---|---|
| canonical | platform.match: Like/Block/MatchController | 09-14 12:13~12:14 | /likes /blocks /matches |
| 二代 | platform.relationship: Relationship(Status)Controller | 09-10 10:59 | /relations/* /relationship/* |
| 一代(规范) | REST API 接口详细设计规范.md | 08-28 | /relationships/*(多一个 hips) |
| 前端 | miniapp/services/matchService.js | 08-29 | 混用二代 + 一代 |
后果:缘分三榜、黑名单页、成功牵手流程全部 404;另有两份重复 success 实现 + 一份桩实现。
## 裁决:采用 2026-09-14 最新路径,前端与二代让位(用户指令)
### 补齐 canonical 模块缺口(此前只有 javadoc 声明或服务方法,无控制器)
- RelationService.unlike() + LikeController `DELETE /likes/{targetUserId}`
- 新增 PassController `POST /passes`(RelationService.pass 在 09-14 模块内却无控制器,补齐与 /likes、/blocks 对称)
- BlockController `GET /blocks`(javadoc 早声明"我的 Block 列表"但未实现,mapper findBlockedByUser 已就绪)
- MatchController `POST /matches/{id}/success/request|confirm|decline`(javadoc 标"Phase 12 预留"),
委派真实实现 RelationshipStatusService;authorizedMatch 对"不存在"与"无权"统一回 404,避免探测他人 Match
- LikeResponse 对齐前端 LikeResult:{ relationStatus, mutualMatch, matchedConversationId, matchId }
Mutual 时调 ChatService.getOrCreateConversation 取会话 id → "双向喜欢→跳聊天"链路真正打通
- LikeController/PassController/BlockController 补 targetUserId 空值校验
### 移除被取代的路由与桩实现
- RelationshipController 移除 like/cancelLike/pass/block/unblock/matches/unmatch/success,仅保留 /fate/*
- RelationshipStatusController 移除 /success/*(已由 /matches/{id}/success/* 取代),保留关系状态生命周期
- RelationshipService 删除 requestSuccess/confirmSuccess 桩 ——
前者自述 "TODO: 查询 relationship_success_requests 表" 却返回硬编码 status="pending",
等于绕过 AGENTS 硬规则 6「成功牵手必须双确认」
- 注意:RelationshipService.like/block/pass 被 P0FixVerificationTest /
RelationshipBlockPriorityPhase08Test 直接测试,方法体保留
### 列表信封统一
- CursorPage 从 chat.dto 提升到 shared.dto(消除 match 模块反向依赖 chat DTO)
- /relations/fate/mutual|liked|likers 与 GET /matches 改返回 { items, nextCursor }
### 前端对齐
- matchService.js 全部路径改到 canonical;补 declineSuccess
- matchStore 补 _decorateBlockedList,修复"模板渲染 blockedAtText 但全仓从未计算"的缺陷
(与上一轮 lastMessageAtText 同源,同类字段一律在 store 装饰一次)
### 文档
- docs/api/API_INVENTORY.md 关系/缘分/匹配三节重写为 canonical 路径;
顶部加 /me/* 路径族显式警告(小程序按规范写 /me/*,后端实为 /profile/*、/photos、/relationship/*,
约 15 个端点会 404,收敛方向未裁决,防止后续照抄踩坑)
- docs/STATUS.md:Backend 回归债务由「待清(277 tests 4F/8E)」更新为「已清偿(297 tests 全绿)」
## 验证
- 新增 CanonicalRouteContractTest(3 例):用 RequestMappingHandlerMapping 断言
canonical 路径已注册、被取代的旧路径不再注册、关系状态生命周期保留 —— 路由再漂移即红
- 后端 297 tests, 0 failures, 0 errors, 3 skipped, BUILD SUCCESS
- 小程序 tsc --noEmit 通过
|
2026-09-15 23:16:27 +08:00 |
|
Codex
|
eaf8fdf195
|
refactor(backend): P0 阻断修复 + 按最新修改时间收敛重复模块与契约
## P0 阻断修复
- 编译:修复实体类与服务类同名导致 Lombok 注解轮次中止的问题
(MatchmakerService/CounselingService -> *Record),196 个编译错误归零
- 权限矩阵:platform_admin 按设计文档收紧为拒绝 5 项高危权限(不改测试阈值)
- 启动:修复 8 组 MyBatis-Plus 同名 bean 冲突(ConflictingBeanDefinition)
与 URL 路由歧义(Ambiguous mapping),应用可正常启动
## 模块收敛(裁决规则:以文件修改时间为准)
- messaging 包整体删除,能力迁移至 chat 包
* 会话列表/详情/未读端点、ConversationDTO、CursorPage
* 消息游标分页统一为 { items, nextCursor }
- relationship 的 Match/UserRelation entity 与 mapper 合并进 match 包
- MatchmakerUserController 合并进 MatchmakerController,删除冗余 Controller
- 补齐 INV-004:chat sendText 增加双向 Block 校验,拉黑后禁止发送
## 契约对齐
- 红娘服务提交请求兼容前端 { requirement } 字段
- 消息与会话分页契约前后端统一
## 测试
- 迁移 6 个风控用例至 ChatSafetyServiceTest
- 清理 messaging 测试包遗留:6 个真实常量断言归位 chat 包,
移除 2 个 assertTrue(true) 占位假测试(Block 真实行为已由
P0FixVerificationTest / RelationshipBlockPriorityPhase08Test 覆盖)
- schema-h2.sql 对齐 PostgreSQL 真实表结构(matches 补列、
conversation_members 改复合主键)
结果:290 tests, 0 failures, 0 errors, 3 skipped, BUILD SUCCESS
|
2026-09-15 22:29:26 +08:00 |
|
Codex
|
0da82c9914
|
docs(gate): add phase 4 gate output artifacts
|
2026-09-14 11:44:02 +08:00 |
|
Codex
|
984827f415
|
docs: phase 4 acceptance report + STATUS sync
- STATUS.md updated: 阶段0-4全部完成, Ready for User Acceptance
- New acceptance report: 三端构建/13契约/源码健康度/债务清单
- CapabilityService independentized (AGENTS.md #26 compliance)
- discover 筛选完整重设计 (5 chip + 4 section + bottom sheet)
- miniapp C组 content/anti-fraud/service-station TS-only
- 三端构建全绿: miniapp tsc=0, admin-web vue-tsc=0, vite build OK
- 13/13 contracts all green
|
2026-09-14 11:43:46 +08:00 |
|
Codex
|
93fc9b0d88
|
feat(miniapp): migrate C-group pages to TypeScript, update contracts
|
2026-09-14 10:14:05 +08:00 |
|
Codex
|
e59038790c
|
docs(status): sync with phase 0 gate results, V035 migration and clean git tree
|
2026-09-14 10:04:08 +08:00 |
|
Codex
|
0518cda95c
|
docs: add phase 04-06 recovery reports, gate outputs and execution plan
|
2026-09-14 10:01:41 +08:00 |
|
Codex
|
8b8972a77b
|
test: verify admin reference UI fidelity
|
2026-09-13 22:09:15 +08:00 |
|
Codex
|
3a634b4ef2
|
docs: finalize UI cleanup report
|
2026-09-13 21:26:30 +08:00 |
|
Codex
|
61ca737e02
|
docs: record UI cleanup checkpoint
|
2026-09-13 21:24:54 +08:00 |
|
Codex
|
c66e42dd8a
|
docs: retire conflicting UI baselines
|
2026-09-13 21:12:50 +08:00 |
|
Codex
|
1deda1e943
|
chore: inventory obsolete UI files
|
2026-09-13 20:15:33 +08:00 |
|
Codex
|
56e8329b59
|
docs: plan reference-driven dual-client UI redesign
|
2026-09-13 20:07:43 +08:00 |
|
Codex
|
8b5d2b35f8
|
docs: define reference-driven dual-client UI redesign
|
2026-09-13 19:54:31 +08:00 |
|
admin
|
aad666d1a0
|
test: freeze full UI redesign page matrix
|
2026-09-11 16:08:17 +08:00 |
|
admin
|
159772f615
|
docs: plan full dual-client UI redesign
|
2026-09-11 15:51:03 +08:00 |
|
admin
|
8550ab980d
|
docs: define dual-client UI redesign
|
2026-09-11 15:09:44 +08:00 |
|
admin
|
ff451d3185
|
docs: plan Codex baseline cleanup
|
2026-09-11 10:15:38 +08:00 |
|
admin
|
8432587b83
|
docs: define Codex baseline cleanup
|
2026-09-11 10:13:02 +08:00 |
|
admin
|
ac2327b499
|
chore: checkpoint before switching to main
|
2026-09-11 09:07:41 +08:00 |
|
admin
|
45ca118453
|
feat: deliver V1.1 dual-client UI fidelity milestone
|
2026-09-10 16:06:11 +08:00 |
|
admin
|
5b51d5b3f1
|
feat: complete phase 02 RBAC and data scope recovery
|
2026-09-10 10:58:43 +08:00 |
|
admin
|
b46b48eb33
|
chore: establish V1.1 recovery baseline
|
2026-09-09 22:05:00 +08:00 |
|