fix: use sage.organization for cross-db LEFT JOIN in tenant_domain_get

This commit is contained in:
yumoqing 2026-07-10 11:16:24 +08:00
parent 4ba37047bd
commit 807ced2de5

View File

@ -10,7 +10,7 @@ env = request._run_ns
async with get_sor_context(env, "tenant") as sor:
sql = """SELECT a.*, b.orgname as sub_distributor_id_text
FROM tenant_domain a
LEFT JOIN organization b ON a.resellerid = b.id
LEFT JOIN sage.organization b ON a.resellerid = b.id
ORDER BY a.created_at DESC"""
recs = await sor.sqlPaging(sql, ns)
rows = []