From 8a22ab961e010c901d470c4b95341bf2eae91850 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 5 Aug 2026 19:14:22 +0800 Subject: [PATCH] =?UTF-8?q?simplify:=20DSPY=E7=9B=B4=E6=8E=A5=E8=AF=BBid?= =?UTF-8?q?=EF=BC=8Cparams=5Fmapping=E9=80=8F=E4=BC=A0=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- json/discount_marketing_list.json | 2 +- wwwroot/api/gen_promo_from_mkt.dspy | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/json/discount_marketing_list.json b/json/discount_marketing_list.json index 1a0f2b7..1a08a70 100644 --- a/json/discount_marketing_list.json +++ b/json/discount_marketing_list.json @@ -86,7 +86,7 @@ }, "params_mapping": { "mapping": { - "id": "mkt_id" + "id": "id" }, "need_other": false }, diff --git a/wwwroot/api/gen_promo_from_mkt.dspy b/wwwroot/api/gen_promo_from_mkt.dspy index 1ea6c77..e578bee 100644 --- a/wwwroot/api/gen_promo_from_mkt.dspy +++ b/wwwroot/api/gen_promo_from_mkt.dspy @@ -1,6 +1,5 @@ # 从营销方案直接生成促销码(toolbar 工具按钮调用) -# 参数 mkt_id = 选中行的 id 字段(params_mapping: id → mkt_id) -mkt_id = params_kw.get('mkt_id', '') +mkt_id = params_kw.get('id', '') if not mkt_id: return {"widgettype": "Error", "options": {"title": "操作失败", "message": "缺少方案ID", "cwidth": 16, "cheight": 9, "timeout": 3}}