消费方引用计数联测(票 07:ref_count 全量接线,customer 域 customer_type 分组)
当前联测字典项:未选择(去「字典项管理」点行内「联测」,customer_type 分组项才可联测)
步骤0
走 POST /api/dict/item/saveOrUpdate:名称组内唯一(63006/63007 幂等可重跑)
步骤1
POST /api/customer/create(confirmSimilar=true)→ 字典项 referenced=true(ref_count +1,同事务入账)
步骤2
POST /api/customer/edit?id=(CAS version)→ 旧项 decrement、新项 increment(applyFieldChange 随迁)
步骤3
POST /api/dict/item/delete → 期望 63009「该字典已被引用,无法删除」(票 04 后引用阻断真实生效)
步骤4
POST /api/customer/archive?id=;归档保留字典编码引用计数(数据一致性优先)