You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
2.0 KiB
22 lines
2.0 KiB
|
15 hours ago
|
# Map · 客户 workspace 查询口径收敛(customer-workspace-criteria)
|
||
|
|
|
||
|
|
- **来源:** /improve-codebase-architecture 2026-09-06 报告(`.scratch/architecture-review-20260906-102629.html`)候选 #1,经 grilling 五决策拍板后出单票实施。
|
||
|
|
|
||
|
|
## Notes
|
||
|
|
|
||
|
|
- 缺陷事实:`CustomerMapper` workspace 公共 WHERE 手写 4 份,`boardSummary` 相对 `pageWorkspace` 静默漂移 3 条件(`FOLLOW_UP_DUE` / `industryCode` / `provinceCode`),javadoc 谎称「完全一致」。
|
||
|
|
- 红灯坐实:4 守恒用例(`Σ boardSummary.cnt == page.total`)先行,改造前 21 跑 3 红(`expected: 1L but was: 2L`)。
|
||
|
|
- 绿灯收口:`mvn -pl crm-customer -am test` 14 类 164 跑全绿;BOM 扫描 716 文件 clean。
|
||
|
|
- 环境注记:本地仓库 crm-rule 快照过旧,跑 crm-customer 测试必须带 `-am`。
|
||
|
|
|
||
|
|
## Decisions-so-far
|
||
|
|
|
||
|
|
1. **漂移按 bug 修**:以 `pageWorkspace` 完整条件为准补齐 boardSummary;saved-view 不拼是票 10 有意差异,保留。→ [issues/01](issues/01-consolidate-where-criteria.md)
|
||
|
|
2. **载体 = 注解 SQL + 接口 String 常量编译期拼接**(`MINE_POOL_DATASET` + `WORKSPACE_COMMON_FILTERS`),拒 XML mapper(全工程零先例 + H2 自举不解析 XML)。理由已写进 `CustomerMapper` 类 javadoc。→ [issues/01](issues/01-consolidate-where-criteria.md)
|
||
|
|
3. **守恒断言机器化**:D-15「同一份列表数据三种渲染、同一查询」从商机侧推广到客户侧,由 `CustomerWorkspaceOwnershipIntegrationTest` 4 用例长期看守;新增筛选须同步加进常量,否则守恒用例红。→ [issues/01](issues/01-consolidate-where-criteria.md)
|
||
|
|
4. **范围 R1 最小票**:只动 `CustomerMapper` + 测试类 + `crm-customer/CONTEXT.md` 补语;`/api/customer/page` 查实非双轨不动;其余 5 条单份语句不动。→ [issues/01](issues/01-consolidate-where-criteria.md)
|
||
|
|
|
||
|
|
## Fog
|
||
|
|
|
||
|
|
无未决问题。报告候选 #2(H2 schema 12 份副本)/ #3(crm-rule 6 同构 Initializer)/ #4(crm-preference 三同构偏好栈)仍为开放候选,未出票。
|