Files
ccdi/docs/reports/implementation/2026-05-15-credit-missing-sentinel-implementation.md

37 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 征信解析缺失标记过滤实施记录
## 背景
征信解析返回中,负债字段的 `*_state` 若为 `-9999`,表示不存在该类型负债;负面风险字段中 `-9999``-9999.0` 也表示不存在对应风险类型,不能按真实负债或负面风险指标落库。
## 修改内容
1. 负债明细装配
- `CreditInfoPayloadAssembler` 中新增 `-9999` 缺失标记识别。
- 当某组负债的 `*_state``-9999` 时,直接跳过该负债类型,不生成 `ccdi_debts_info` 明细。
- 数值和状态转换过程中同步将 `-9999` 视为空值,避免缺失标记落库。
2. 负面风险装配
- `lx_publictype` 中次数字段为 `-9999` 时按 `0` 处理。
- `lx_publictype` 中金额字段为 `-9999``-9999.0` 时按空值处理。
3. 测试
- 补充 `*_state=-9999` 时跳过负债类型的单测。
- 补充负面风险 `-9999` 转换为 `0/null` 的单测。
4. 文档
- 更新 `docs/design/2026-03-23-credit-info-maintenance-design.md` 中负债过滤和负面风险缺失值规则。
## 影响范围
- 仅影响征信解析 payload 到负债明细、负面风险表的装配逻辑。
- 不涉及接口调用、成功判断、数据库结构和前端页面。
## 验证
- `mvn -pl ccdi-info-collection -am -Dtest=CreditInfoPayloadAssemblerTest,CcdiCreditInfoServiceImplTest -Dsurefire.failIfNoSpecifiedTests=false test`通过10 个用例成功。
- `git diff --check`:通过。
- 使用 `/Users/wkc/Downloads/zxjx.txt` 按当前规则复核:
- 负债明细仅保留 `uncle_bank_manage``uncle_not_bank` 两类。
- 负面风险 `civil/enforce/adm``-9999` 均按无对应风险处理。