fix: get_discount_info查询discount_marketing表而非discount表

This commit is contained in:
yumoqing 2026-07-04 20:23:07 +08:00
parent cd69111655
commit 90e2fd0c0c

View File

@ -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})