fix(bid_flow): C1段动态IN占位符去手工引号——sqlor ${X}$替换为%s参数化(值走参数绑定),手工包单引号变''value''致1064(2026-09-16实测:重启后对账器C1崩溃,与ticket模块sqlor裸占位符铁律同款)

This commit is contained in:
yumoqing 2026-09-16 12:05:23 +08:00
parent 1167371844
commit 09af403809

View File

@ -1119,7 +1119,9 @@ async def reconcile_project(sor, project_id, project_name=""):
continue
_titles = ("章节反复不达标需人工介入:%s %s" % (c.get("chapter_no"), c.get("title")),
"章节实体材料缺口(信息流):%s %s" % (c.get("chapter_no"), c.get("title")))
_in = ",".join("'${t%d}$'" % i for i in range(len(_titles)))
# ⚠ sqlor 的 ${key}$ 替换自带引号——动态 IN 列表占位符必须裸写,
# 手工包单引号会变成 ''value'' 1064(2026-09-16 实测触雷)
_in = ",".join("${t%d}$" % i for i in range(len(_titles)))
_p = {"pid": project_id}
for i, t in enumerate(_titles):
_p["t%d" % i] = t[:480]