Skip to content

21:客户端接口交互目录:按 Controller 定位业务 ​

本章是源码导航表。它根据当前 controller/web/client 的注解和 Mapping 整理;请求/响应字段应继续查看同名 Form、VO、DTO 和 ServiceImpl。
@WebClientRestController("/x") 的网关前缀通常为 /crm/web/client/x;直接 @RequestMapping 的路径以源码为准。

1. 客户主资料和附属资料 ​

Controller源码基路径主要交互
CustomerInfoController/customerInfosave、edit、findById、query/page、getSelectList、query/businessInfoList、del、del/batch
CustomerContactController/customerContactquery/page、query/claimContactPage、edit
CustomerBusinessInfoController/customerBusinessInfosave、edit、findById、query/page、del/batch
CustomerBankInfoController/customerBankInfosave、edit、findById、query/page、del/batch
CustomerInvoiceController/customerInvoicesave、edit、findById、query/page
CustomerRegionController/customerRegionsave、edit、findById、query/page、del/batch
CustomerIndustryController/customerIndustrysave、edit、findById、query/page、del/batch
CustomerBrandRelationController/customerBrandRelationsave、edit、findById、query/page、del/batch
CustomerInfoChangeLogController/customerInfoChangeLogsave、edit、findById、query/page、del/batch

交互主线:前端通常通过客户详情页分别请求这些附属资料;创建客户时又由 CustomerInfoServiceImpl 将部分子资料作为嵌套 Form 一次保存。

2. 客户产品跟进、公海和保护规则 ​

Controller源码基路径主要交互
CustomerProductFollowController/web/client/customerProductFollowsave、transfer、share、claim、query/followPage、query/customerfollowPage、query/publicPoolPage、query/currentFollowProductList
CustomerFollowRecordController/customerFollowRecordsave、query/page、claimFollowRecord、export
CustomerFollowRecordCommentController/customerFollowRecordCommentsave、query/page、del/batch
CustomerProtectConfigurationController/web/client/customerProtectConfigurationsaveOrUpdate、findAll、findByConfigType
CustomerProtectSpecialConfigController/web/client/customerProtectSpecialConfigsave、edit、query/page

注意:公海分页和认领接口位于 CustomerProductFollowController,但真实业务实现分别在 CustomerProductPublicPoolServiceImpl 和 CustomerProductFollowServiceImpl。

3. 项目评估、合同与试单 ​

Controller源码基路径主要交互
ProjectEvaluationController/projectEvaluationsave、edit、findById、query/page、flowCallBack
ContractController/contractsave、edit、findById、query/page、flowCallBack
ContractContactController/contractContactsave、edit、findById、query/page、del/batch
ContractCustomerRelationController/contractCustomerRelationsave、edit、findById、query/page、del/batch
ContractBusinessModelController/contractBusinessModelsave、edit、findById、query/page、del/batch
TrialOrderApplicationController/trialOrderApplicationsave、edit、findById、query/page、flowCallBack
TrialOrderProductController/trialOrderProductfindById、query/page

flowCallBack 是外部 BPM 流程状态回流入口;不要用普通前端页面随意模拟正式环境回调,除非理解签名、幂等和状态机规则。

4. 基础资料 ​

Controller源码基路径主要交互
ProductController/productsave、edit、findById、query/page、del/batch
CustomerBrandController/customerBrandsave、edit、findById、query/page
BrandOwnerRelationController/brandOwnerRelationsave、edit、findById、query/page、del/batch
IndustryDictController/industryDictsave、edit、findById、query/page、query/tree、del/batch
RegionController/regionsave、edit、findById、query/page、del/batch
PositionController/positionsave/batch、edit、findById、query/page
PositionChangeLogController/positionChangeLogquery/page
SettlementRuleController/settlementRulesave、edit、findById、query/page、query/tree、del/batch
EnumController/enumGET options

5. 文件与导入 ​

Controller源码基路径主要交互
SysFileController/sysFilefindById、query/page、del/batch
ImportRecordController/importRecordfindById、getByTaskId、import、query/page、downloadExcelTemplate、downloadImportFailFile

6. 如何从接口开始追踪业务 ​

以“产品公海认领”为例:

text
POST /web/client/customerProductFollow/claim
  -> CustomerProductFollowClaimForm
  -> CustomerProductFollowConverter.convertFormToDto
  -> CustomerProductPublicPoolServiceImpl.claim
  -> customer_product_public_pool / customer_product_follow / customer_product_claim_log
  -> CustomerInfoChangeLog(业务审计)

以“合同审批回调”为例:

text
POST /contract/flowCallBack
  -> ContractController
  -> ContractServiceImpl.updateFlowProgress
  -> contract.flow_status
  -> applyDeadlineRule
  -> customer_product_follow + customer_follow_deadline_log
  -> customer_info.signing_date(首次成交时)

这就是分析新需求时应使用的路径:URL → Form → Converter → ServiceImpl → Entity/表 → 关联 Service/外部服务。

Lucking