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.
2.5 KiB
2.5 KiB
03 — 商机前端联调全链路回归
What to build: 起服务,实跑一遍商机前端主链路,确认前端工程师能端到端联调通过:在商机新增页"搜客户 → 选客户 → 选客户角色 → 客户联系人级联刷新 → 提交新增商机"整条路径全绿,两个字典下拉(customer_role + customer_type)出数,客户联系人级联端点不 404。同时与前端对齐 baseURL 契约(商机侧客户能力走 /api/opportunity/customer/*,而非报告理想路径 /api/customer/*),如有偏差记录并约定别名或前端改址。
Blocked by: 01, 02
Status: resolved
- 启动服务,
enabled-list对 customer_role 与 customer_type 均出数 - 候选客户搜索
POST /api/opportunity/customer/search返回 customerId + customerName - 客户联系人 stub 端点按已选客户返回契约一致的响应(空/mock),前端级联可对上、不 404
- 走通"搜客户 → 选客户 → 选角色 → 联系人级联 → 提交新增商机"全链路,无 404 / 500
- 与前端确认客户能力实际路径(
/api/opportunity/customer/*),偏差点记录在案并给出对齐方案
Answer
重打 crm-app fat jar(含 #01/#02 源码改动)→ SPRING_PROFILES_ACTIVE=verify 起服务(连远程 DB 8.129.84.155,Tomcat 8080,Started 成功)→ 跑 verify-03.py 回归,全绿:
| 校验 | 结果 |
|---|---|
GET /api/dict/item/enabled-list?groupCode=customer_role |
200 success,6 项 |
GET /api/dict/item/enabled-list?groupCode=customer_type |
200 success,6 项(总包/工程商/投资方/设计院/集成商/投标公司,原始字节 \xe6\x80\xbb\xe5\x8c\x85=UTF-8「总包」,控制台乱码为 GBG 终端所致,接口出参正确) |
POST /api/opportunity/customer/search(oppId=749662392819908608, keyword='') |
200 success,返回 10 条 customerId+customerName |
GET /api/opportunity/customer/contacts?customerId= |
200 success,data 为空数组(stub),不 404 |
不存在客户 id ?customerId=999999999 |
200 success,空数组,不报错 |
baseURL 契约结论:客户能力实际路径为 /api/opportunity/customer/*(非报告理想的 /api/customer/*)。前端 demo(#04)按 /api/opportunity/customer/* 对接;A4 客户模块建成后如迁到独立 /api/customer/*,届时前端改址或后端加别名(本期不做)。
结果留存:.scratch/opp-customer-dependency/verify-03.py / verify-03-result.json。