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.
35 lines
1.8 KiB
35 lines
1.8 KiB
|
3 days ago
|
# 05 · 平台形态偏好:user_view_form 表 + 端点,客户/商机双接入
|
||
|
|
|
||
|
|
- **Status:** open
|
||
|
|
- **Type:** task
|
||
|
|
- **Blocked by:** 01-ag-checklist
|
||
|
|
|
||
|
|
## 目标
|
||
|
|
|
||
|
|
crm-preference 新增「形态偏好」平台能力(R6),客户三页签 + 联系人 + 商机三菜单接入(R7)。用户上次选择的视图形态(list/split/board)跨会话记忆。
|
||
|
|
|
||
|
|
## 平台侧(crm-preference)
|
||
|
|
|
||
|
|
- 实体 `UserViewForm`:表 `user_view_form`,`UNIQUE(user_id, scope_key)`,`view_form varchar(16)`,无 create_by/update_by(同 UserColumnPreference 范式:author 恒为 user_id);
|
||
|
|
- `ViewFormController`:
|
||
|
|
- `GET /api/preference/view-form/get?scopeKey=` → `Result<String>`(null = 未设置);
|
||
|
|
- `POST /api/preference/view-form/save`(form 绑定,**禁 @RequestBody**);
|
||
|
|
- 值域白名单 `list` / `split` / `board`,非法值 67001 口径拒绝;
|
||
|
|
- tags 双归属(方法级多值):客户侧 `A4 客户管理/客户总览`、`A4 客户管理/我的客户`、`A4 客户管理/客户公海`、`A4 客户管理/联系人`;商机侧 `A3 商机管理/销售机会`、`A3 商机管理/商机管理`、`A3 商机管理/商机公海`。
|
||
|
|
|
||
|
|
## 接入侧(零端点,只加常量,参考线索列偏好范式)
|
||
|
|
|
||
|
|
- crm-customer 常量:`VIEW_FORM_SCOPE_OVERVIEW/MINE/POOL/CONTACT` = `customer.overview/mine/pool`、`contact.list`;
|
||
|
|
- crm-opportunity 常量:`opportunity.sales/manage/public_pool`(与 saved-view `opportunity.sales` 对齐);
|
||
|
|
- 前端调平台端点读写,未设置 → 默认 list。
|
||
|
|
|
||
|
|
## 验收
|
||
|
|
|
||
|
|
- crm-preference + 两接入模块 mvn test 绿;
|
||
|
|
- 单测覆盖:存取往返、白名单拒绝、UNIQUE 覆盖更新;
|
||
|
|
- knife4j 分组出现双归属页面。
|
||
|
|
|
||
|
|
## 同步动作
|
||
|
|
|
||
|
|
`.scratch/customer-module/map.md` 增补决策条目(形态偏好平台化);crm-preference CONTEXT 若有"形态偏好规划"段落则补实现指针。
|