fix(phase-6.1): CR 六项修复——派发链三件套/登记顺序/判死口凭据化/脏时间可读/UPDATE 段摘死列

This commit is contained in:
2026-11-14 13:53:03 +08:00
parent edeffc26c4
commit 796ec2130f
10 changed files with 346 additions and 32 deletions
@@ -7,12 +7,16 @@
(R6/AC-5)。后管只读页的分页/筛选 SQL(Phase 5)落同份 XML。 -->
<!-- 同步链唯一写入口(Phase 2 落 JdResultIngestService):多值批量 upsert,
AppearancePatentCleanItemMapper#upsertBatch 同形。刻意不写 company_id/shop_id/
AppearancePatentCleanItemMapper#upsertBatch 同形。刻意不写 company_id/
product_code 的 UPDATE 段(唯一键三元组自身不随更新漂移);
synced_at 在 UPDATE 段显式刷 CURRENT_TIMESTAMP(INSERT 路径走列默认值,
显式传 null 会覆盖掉默认值,故两段口径分开)。
⚠ upsert-only:回传读出 0 行=什么都不写,不得 delete-then-insert 覆盖式重写
(重投递载荷读不准时会抹掉存量,AppearancePatentCleanItemMapper 2026-11-11 实录)。 -->
(重投递载荷读不准时会抹掉存量,AppearancePatentCleanItemMapper 2026-11-11 实录)。
⚠ UPDATE 段不写 image_count / main_image_url(P1-1):buildRow 恒 0/恒 null,
写进 UPDATE 会把登记链 refreshProductImageCount 刷的真实计数抹回 0
(后管「图片数」恒 0);image_count 只由登记侧按表实数刷,main_image_url
是 P2 死列(BACKLOG B98-01)不随更新。 -->
<insert id="upsertBatch">
INSERT INTO biz_jd_product
(company_id, user_id, task_id, shop_id, shop_name, product_code, sku_id,
@@ -44,11 +48,9 @@
list_tab = VALUES(list_tab),
jd_created_at = VALUES(jd_created_at),
jd_updated_at = VALUES(jd_updated_at),
main_image_url = VALUES(main_image_url),
detail_url = VALUES(detail_url),
attr_json = VALUES(attr_json),
attr_count = VALUES(attr_count),
image_count = VALUES(image_count),
collect_batch_id = VALUES(collect_batch_id),
synced_at = CURRENT_TIMESTAMP
</insert>