From 9b695301ca37bd19a610902a5ef2157deaa31d5c Mon Sep 17 00:00:00 2001 From: ymq Date: Thu, 27 Aug 2026 12:40:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(register):=20free=20customer=20bind=20?= =?UTF-8?q?=E6=B1=A0=E5=90=8D=E7=A1=AC=E7=BC=96=E7=A0=81'discount'?= =?UTF-8?q?=E2=86=92get=5Fmodule=5Fdbname('discount')?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pipeline-app 共库单池,硬编码'discount'导致 dbdesc=None → 'NoneType' object has no attribute 'get'。 租户域名逻辑本身无误:域名未注册→parentid=None→reseller_id='0'平台自营兜底。 改用 get_module_dbname 后 sage(discount独立库)/pipeline-app(共库)双宿主均正确。 --- wwwroot/user/register.dspy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wwwroot/user/register.dspy b/wwwroot/user/register.dspy index 14801e1..db8117d 100644 --- a/wwwroot/user/register.dspy +++ b/wwwroot/user/register.dspy @@ -52,7 +52,7 @@ async with db.sqlorContext(dbname) as sor: # 非促销码注册: 创建自由客户归属记录 (bind_type=3 域名注册) try: reseller_id = parentid or '0' - async with DBPools().sqlorContext('discount') as disc_sor: + async with DBPools().sqlorContext(get_module_dbname('discount')) as disc_sor: existing = await disc_sor.sqlExe( 'SELECT id FROM discount_customer_bind WHERE customerid = ${cid}$', {'cid': orgid}