6.7 KiB
6.7 KiB
2026-04-29 客户号查询选择客户内码实施记录
修改内容
- 后端新增个人/企业客户号映射业务接口:
GET /loanPricing/workflow/customer-map/personal?custId=...GET /loanPricing/workflow/customer-map/corporate?custId=...
- 后端新增个人/企业客户号映射 mock 接口:
GET /rate/pricing/mock/customer-map/personal?cust_id=...GET /rate/pricing/mock/customer-map/corporate?cust_id=...
- 配置文件新增
customer-map个人/企业地址,并在dev、uat、proprofile 中统一指向本项目 mock。 - 前端新增客户号查询选择弹窗。
- 客户号查询选择弹窗宽度调整为窗口宽度的
80%。 - 客户号查询输入值在查询前去除前后空格;后端转发个人/企业客户号映射接口前同步去除前后空格,并对下游
cust_id查询参数做 URI 编码,避免尾随空格进入 request target 触发 TongWebHTTP Status 400。 - 选中客户号查询结果后,返回参数
cust_id去除前三位后自动回填到新增弹窗基础信息的证件号码字段。 - 个人/企业新增流程改为先查询客户号、选择客户内码,再打开新增弹窗。
- 新增弹窗客户内码和客户名称由选中记录自动带入并只读。
验证结果
- 后端针对性测试:通过。
- 命令:
mvn -pl ruoyi-loan-pricing -am -Dtest=CustomerMapRecordVOTest,LoanPricingCustomerMapServiceTest,LoanRatePricingMockControllerCustomerMapTest,LoanPricingWorkflowControllerCustomerMapTest -Dsurefire.failIfNoSpecifiedTests=false test - 结果:
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0。
- 命令:
- 客户号空格 400 修复补充测试:通过。
- 命令:
mvn -pl ruoyi-loan-pricing -am -Dtest=LoanPricingCustomerMapServiceTest,LoanRatePricingMockControllerCustomerMapTest -Dsurefire.failIfNoSpecifiedTests=false test - 结果:
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0。
- 命令:
- 后端打包与启动验证:通过。
- 命令:
mvn -pl ruoyi-admin -am -DskipTests package - 命令:
java -jar ruoyi-admin/target/ruoyi-admin.jar --spring.profiles.active=dev - 结果:后端以
devprofile 启动成功,端口63310可用。
- 命令:
- 接口验证:通过。
GET /rate/pricing/mock/customer-map/personal?cust_id=P001返回随机个人客户映射列表,字段为cust_id、cust_isn、cust_name、faith_day、balance_avg、loan_count_his、last_loan_date。GET /rate/pricing/mock/customer-map/corporate?cust_id=C001返回随机企业客户映射列表,字段同上。GET /rate/pricing/mock/customer-map/personal?cust_id=返回客户号不能为空。- 登录后调用
GET /loanPricing/workflow/customer-map/personal?custId=P001和GET /loanPricing/workflow/customer-map/corporate?custId=C001均返回对应映射列表。 - 登录后调用
GET /loanPricing/workflow/customer-map/personal?custId=返回客户号不能为空。 - 补充验证:以最新后端临时端口
63311调用GET /loanPricing/workflow/customer-map/personal?custId=1w0xc20xb7%20返回code=200,返回cust_id为1w0xc20xb7;调用GET /loanPricing/workflow/customer-map/corporate?custId=C001%20返回code=200,返回cust_id为C001;调用GET /loanPricing/workflow/customer-map/personal?custId=%20返回客户号不能为空。
- 前端针对性测试:通过。
- 命令:
zsh -lic 'nvm use 14.21.3 >/dev/null && node ruoyi-ui/tests/customer-map-selection.test.js && npm --prefix ruoyi-ui run test:personal-create-input-params && npm --prefix ruoyi-ui run test:corporate-create-input-params && node ruoyi-ui/tests/workflow-index-refresh.test.js' - 结果:
customer map selection assertions passed、personal create input params assertions passed、corporate create input params assertions passed、workflow-index-refresh test passed。 - 补充命令:
zsh -lic 'nvm use 14.21.3 >/dev/null && node ruoyi-ui/tests/customer-map-selection.test.js' - 补充结果:
customer map selection assertions passed,覆盖客户号去前三位回填证件号码断言。 - 补充回归命令:
zsh -lic 'nvm use 14.21.3 >/dev/null && node ruoyi-ui/tests/customer-map-selection.test.js && npm --prefix ruoyi-ui run test:personal-create-input-params && npm --prefix ruoyi-ui run test:corporate-create-input-params && node ruoyi-ui/tests/id-number-validation-removal.test.js' - 补充回归结果:
customer map selection assertions passed、personal create input params assertions passed、corporate create input params assertions passed、id number validation removal assertions passed。
- 命令:
- 前端生产构建:通过。
- 命令:
zsh -lic 'nvm use 14.21.3 >/dev/null && npm --prefix ruoyi-ui run build:prod' - 结果:构建成功;输出 2 个既有体积 warning。
- 命令:
- 真实页面验证:通过。
- 启动前端
http://localhost:18080/,登录后进入真实页面http://localhost:18080/loanPricing/workflow。 - 个人客户:点击
新增->个人客户-> 客户号查询输入PTEST003-> 返回多条客户映射 -> 选择首行 -> 打开新增个人利率定价流程,客户内码自动带入81000450472,客户名称自动带入个人客户1,两个字段均为readonly。 - 企业客户:点击
新增->企业客户-> 客户号查询输入CTEST001-> 返回多条客户映射 -> 选择首行 -> 打开新增企业利率定价流程,客户内码自动带入81000448819,客户名称自动带入企业客户1,两个字段均为readonly。 - 弹窗宽度补充验证:点击
新增->个人客户后,客户号查询弹窗 DOM 样式为margin-top: 15vh; width: 80%;。 - 客户号空格补充验证:点击
新增->个人客户,客户号输入1w0xc20xb7后查询,输入框显示为1w0xc20xb7,列表正常返回客户映射,页面未出现400或Bad Request。 - 客户号到证件号码补充验证:点击
新增->个人客户,客户号输入ABC123456789并选择返回行后,新增个人弹窗基础信息的证件号码自动填入123456789。 - 页面验证仅验证查询选择与自动回填链路,未提交新增表单,避免写入额外流程测试数据。
- 启动前端
- 回归补充说明:
LoanPricingModelServiceTest已通过。- 组合回归命令包含
LoanPricingWorkflowServiceImplTest时,当前本机 Oracle JDK 21 环境下 Mockito inline/Byte Buddy self-attach 失败,属于既有测试环境限制,不是本次客户号映射功能断言失败。
- 进程清理:已关闭本次启动的后端和前端进程。
- 本次宽度与客户号空格补充验证结束后,
18080、63311无监听;63310为验证前已存在的后端进程,未处理。