From 90e2fd0c0cecc2c14171ac9ab5ab6564b68e4d56 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 4 Jul 2026 20:23:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20get=5Fdiscount=5Finfo=E6=9F=A5=E8=AF=A2d?= =?UTF-8?q?iscount=5Fmarketing=E8=A1=A8=E8=80=8C=E9=9D=9Ediscount=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- discount/init.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/discount/init.py b/discount/init.py index 3800537..19aa2a2 100644 --- a/discount/init.py +++ b/discount/init.py @@ -805,10 +805,10 @@ async def get_discount_info(request): config = getConfig() db.databases = config.databases sql = """ - SELECT d.name, o.orgname - FROM discount d - LEFT JOIN organization o ON d.customerid = o.id - WHERE d.id = ${discountid}$ + SELECT dm.name, o.orgname + FROM discount_marketing dm + LEFT JOIN organization o ON dm.resellerid = o.id + WHERE dm.id = ${discountid}$ """ async with db.sqlorContext(dbname) as sor: recs = await sor.sqlExe(sql, {'discountid': discountid})