From 01a4dddc599f998db6a7f7ed9686ac4db4e1cc1d Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 24 Jun 2026 21:26:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=A7=E5=93=81=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=8E=BB=E6=8E=89org=5Fid=E9=99=90=E5=88=B6=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=B7=A8=E5=BA=93JOIN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/discount_setting/get_products_with_discount.dspy | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/wwwroot/discount_setting/get_products_with_discount.dspy b/wwwroot/discount_setting/get_products_with_discount.dspy index faf6ca4..1fd4664 100644 --- a/wwwroot/discount_setting/get_products_with_discount.dspy +++ b/wwwroot/discount_setting/get_products_with_discount.dspy @@ -25,16 +25,14 @@ SELECT dd.id as detail_id, dd.discount, dd.discountid -FROM product p -LEFT JOIN product_category pc ON p.category_id = pc.id +FROM {product_management}.product p +LEFT JOIN {product_management}.product_category pc ON p.category_id = pc.id LEFT JOIN discount_detail dd ON dd.productid = p.id AND dd.discountid = ${discountid}$ -WHERE p.org_id = ${org_id}$ AND p.status = '1' +WHERE p.status = '1' ORDER BY pc.name, p.product_name ''' -ns['org_id'] = user_orgid - db = DBPools() dbname = get_module_dbname('discount') async with db.sqlorContext(dbname) as sor: