55 lines
3.1 KiB
Markdown
55 lines
3.1 KiB
Markdown
# 2026-04-27 个人模型输出灰黑名单客户字段实施记录
|
||
|
||
## 修改内容
|
||
|
||
- 后端个人模型输出实体 `ModelRetailOutputFields` 新增 `greyBlackCust` 字段,承接个人模型返回的 `0/1` 输出值。
|
||
- 个人模型 mock 返回文件 `retail_output.json` 新增 `greyBlackCust: "1"`,用于本地模型调用链路验证。
|
||
- `model_retail_output_fields` 表结构新增 `grey_black_cust` 字段,并补充增量迁移脚本 `sql/add_model_retail_grey_black_cust_20260427.sql`。
|
||
- 前端模型输出组件在个人客户“基本信息”分组中展示“灰黑名单客户”,直接展示后端返回值 `0/1`。
|
||
- 接口文档示例补充 `greyBlackCust` 返回字段。
|
||
|
||
## 涉及文件
|
||
|
||
- `ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/domain/entity/ModelRetailOutputFields.java`
|
||
- `ruoyi-loan-pricing/src/main/resources/data/retail_output.json`
|
||
- `ruoyi-loan-pricing/src/test/java/com/ruoyi/loanpricing/domain/entity/ModelRetailOutputFieldsTest.java`
|
||
- `ruoyi-ui/src/views/loanPricing/workflow/components/ModelOutputDisplay.vue`
|
||
- `ruoyi-ui/tests/retail-display-fields.test.js`
|
||
- `sql/model_retail.sql`
|
||
- `sql/loan_pricing_schema_20260328.sql`
|
||
- `sql/loan_pricing_prod_init_20260331.sql`
|
||
- `sql/add_model_retail_grey_black_cust_20260427.sql`
|
||
- `doc/api/loan-pricing-workflow-api.md`
|
||
|
||
## 数据库变更
|
||
|
||
- 已在开发库 `loan-pricing.model_retail_output_fields` 执行新增列:
|
||
|
||
```sql
|
||
ALTER TABLE model_retail_output_fields
|
||
ADD COLUMN grey_black_cust varchar(100) DEFAULT '' COMMENT '灰黑名单客户' AFTER base_loan_rate;
|
||
```
|
||
|
||
- 回查结果确认 `grey_black_cust` 字段存在。
|
||
|
||
## 验证记录
|
||
|
||
- `mvn -pl ruoyi-loan-pricing -Dtest=ModelRetailOutputFieldsTest,LoanPricingModelServiceTest -Dsurefire.failIfNoSpecifiedTests=false test`
|
||
- 通过,确认实体字段存在,个人/企业模型调用基础链路未回归。
|
||
- `zsh -lic 'nvm use 14 >/dev/null && npm --prefix ruoyi-ui run test:retail-display-fields && npm --prefix ruoyi-ui run test:model-output-flat-display'`
|
||
- 通过,确认前端包含 `retailOutput.greyBlackCust` 且字段位于个人模型输出“基本信息”分组。
|
||
- `zsh -lic 'nvm use 14 >/dev/null && npm --prefix ruoyi-ui run build:prod'`
|
||
- 通过,存在既有包体积 warning,无编译错误。
|
||
- 后端真实接口验证:
|
||
- 重启后端后调用个人流程创建接口,业务流水号 `20260427153305173`。
|
||
- 调用详情接口返回 `modelRetailOutputFields.greyBlackCust = 1`。
|
||
- 数据库联表回查 `model_retail_output_fields.grey_black_cust = 1`。
|
||
- browser-use 真实页面验证:
|
||
- 使用前端开发服务 `http://127.0.0.1:63311/` 打开真实流程详情页。
|
||
- 页面 `模型输出 > 基本信息` 中可见“灰黑名单客户”,展示值为 `1`。
|
||
- 测试结束后已停止本次启动的后端 `63310` 与前端 `63311` 进程,并回查端口不再监听。
|
||
|
||
## 备注
|
||
|
||
- 组合执行 `LoanPricingModelServicePersonalParamsTest` 时,当前本机 JDK 21 下 Mockito inline ByteBuddy 自附加失败;该失败与本次字段改动无关。已单独执行本次直接相关的非 Mockito 失败用例并通过。
|