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.
1.4 KiB
1.4 KiB
03 直接新建 adapter 业务接线 + 校验
Type: task Status: resolved
目标
把 01 票新增的 DTO 字段在 OpportunityCreateServiceImpl.createOpportunity 里真实翻译进 OpportunityIntakeSpec,并补业务校验。
改动
1. DTO → spec 翻译(OpportunityCreateServiceImpl)
new OpportunityIntakeSpec(...) 构造处,把以下字段从 request 传入(替换相应位置的 null):
projectAmount←request.getProjectAmount()address←request.getAddress()customerRole←request.getCustomerRole()isPrimaryIntended←request.getIsPrimaryIntended()keyContactId/keyContactName/keyContactCompany← request 对应字段
2. 校验规则
isPrimaryIntended:当customerId非空时必填,取值仅 1/0;customerId为空时忽略(不强制,A4 未建)。customerRole:当customerId非空时必填;空则沿用深模块回退ROLE_INTENDED。- 六必填校验(D-14)不变。
3. OpportunityCreationPortImpl(线索转入 adapter)
本票不改业务语义:新 spec 组件传 null / 默认(保持 LEAD_CONVERT 现有行为),只保证编译通过。
完成标准
- createOpportunity 翻译 7 个新字段进 spec
- isPrimaryIntended / customerRole 校验按规则
- 线索转入 port 编译通过、行为不变
mvn -pl crm-opportunity compile通过