From 5eacfefb6c0a1ee4c91f081cf0397d055bc24146 Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Mon, 28 Sep 2026 03:19:29 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20RIIN=20=E5=95=86=E5=93=81=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E8=A1=A5=20CLOSE=3D=E5=B7=B2=E5=8F=96=E6=B6=88(?= =?UTF-8?q?=E9=87=8D=E6=8B=89=E6=AE=8B=E7=95=99=E6=97=B6=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E5=8F=91=E7=8E=B0=E7=9A=84=E6=96=B0=E6=9E=9A=E4=B8=BE;UNKNOWN?= =?UTF-8?q?=20=E4=BF=9D=E7=95=99=20NULL)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flows/shared/mappers.py | 2 ++ tests/test_mappers.py | 1 + 2 files changed, 3 insertions(+) diff --git a/flows/shared/mappers.py b/flows/shared/mappers.py index ac14f61..83c7d1a 100644 --- a/flows/shared/mappers.py +++ b/flows/shared/mappers.py @@ -35,6 +35,8 @@ RIIN_GOODS_STATUS_MAP: dict[str, str] = { "CANCELLED": "已取消", "REFUNDING": "退款中", # 商品级状态复用平台状态枚举,COMPLETE/PAUSE 缺失曾导致 1/3 商品行 status 为 NULL "COMPLETE": "已完成", "PAUSE": "暂停", + # CLOSE 同为商品终态(Goods 约束无"已关闭",取"已取消");UNKNOWN 保留 NULL 并由告警暴露 + "CLOSE": "已取消", } RIIN_PLATFORM_STATUS_MAP: dict[str, str] = { diff --git a/tests/test_mappers.py b/tests/test_mappers.py index e74d248..ae5de8b 100644 --- a/tests/test_mappers.py +++ b/tests/test_mappers.py @@ -53,6 +53,7 @@ class RiinGoodsStatusTest(unittest.TestCase): "REFUNDING": "退款中", "COMPLETE": "已完成", # 本次补齐(曾导致 NULL) "PAUSE": "暂停", # 本次补齐(曾导致 NULL) + "CLOSE": "已取消", # 回填重拉时告警发现的新枚举 } for raw, want in cases.items(): with self.subTest(raw=raw):