Skip to content

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

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

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

Controller源码基路径主要交互
CustomerInfoController/customerInfosaveeditfindByIdquery/pagegetSelectListquery/businessInfoListdeldel/batch
CustomerContactController/customerContactquery/pagequery/claimContactPageedit
CustomerBusinessInfoController/customerBusinessInfosaveeditfindByIdquery/pagedel/batch
CustomerBankInfoController/customerBankInfosaveeditfindByIdquery/pagedel/batch
CustomerInvoiceController/customerInvoicesaveeditfindByIdquery/page
CustomerRegionController/customerRegionsaveeditfindByIdquery/pagedel/batch
CustomerIndustryController/customerIndustrysaveeditfindByIdquery/pagedel/batch
CustomerBrandRelationController/customerBrandRelationsaveeditfindByIdquery/pagedel/batch
CustomerInfoChangeLogController/customerInfoChangeLogsaveeditfindByIdquery/pagedel/batch

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

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

Controller源码基路径主要交互
CustomerProductFollowController/web/client/customerProductFollowsavetransfershareclaimquery/followPagequery/customerfollowPagequery/publicPoolPagequery/currentFollowProductList
CustomerFollowRecordController/customerFollowRecordsavequery/pageclaimFollowRecordexport
CustomerFollowRecordCommentController/customerFollowRecordCommentsavequery/pagedel/batch
CustomerProtectConfigurationController/web/client/customerProtectConfigurationsaveOrUpdatefindAllfindByConfigType
CustomerProtectSpecialConfigController/web/client/customerProtectSpecialConfigsaveeditquery/page

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

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

Controller源码基路径主要交互
ProjectEvaluationController/projectEvaluationsaveeditfindByIdquery/pageflowCallBack
ContractController/contractsaveeditfindByIdquery/pageflowCallBack
ContractContactController/contractContactsaveeditfindByIdquery/pagedel/batch
ContractCustomerRelationController/contractCustomerRelationsaveeditfindByIdquery/pagedel/batch
ContractBusinessModelController/contractBusinessModelsaveeditfindByIdquery/pagedel/batch
TrialOrderApplicationController/trialOrderApplicationsaveeditfindByIdquery/pageflowCallBack
TrialOrderProductController/trialOrderProductfindByIdquery/page

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

4. 基础资料

Controller源码基路径主要交互
ProductController/productsaveeditfindByIdquery/pagedel/batch
CustomerBrandController/customerBrandsaveeditfindByIdquery/page
BrandOwnerRelationController/brandOwnerRelationsaveeditfindByIdquery/pagedel/batch
IndustryDictController/industryDictsaveeditfindByIdquery/pagequery/treedel/batch
RegionController/regionsaveeditfindByIdquery/pagedel/batch
PositionController/positionsave/batcheditfindByIdquery/page
PositionChangeLogController/positionChangeLogquery/page
SettlementRuleController/settlementRulesaveeditfindByIdquery/pagequery/treedel/batch
EnumController/enumGET options

5. 文件与导入

Controller源码基路径主要交互
SysFileController/sysFilefindByIdquery/pagedel/batch
ImportRecordController/importRecordfindByIdgetByTaskIdimportquery/pagedownloadExcelTemplatedownloadImportFailFile

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