From d3faa0c037af5082a801daa9da134c66bd39bae7 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 1 Jun 2022 10:51:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=8C=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=B8=8D=E5=90=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9A=84=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rest/wechat/add.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rest/wechat/add.js b/src/rest/wechat/add.js index 487e8b3..bd57970 100644 --- a/src/rest/wechat/add.js +++ b/src/rest/wechat/add.js @@ -3,11 +3,11 @@ module.exports = { action: "/node/wxmp/addOrUpdate", method: "post", execute: (request, response) => { - let {appid, privateKey, projectPath, version, miniapp_appid} = request.body, - form = {appid, privateKey, projectPath, version}, sql + let {appid, privateKey, projectPath, version, miniapp_appid, id: pid} = request.body, + form = {appid, privateKey, projectPath, version, pid}, sql if (form.appid) {//编辑 let arr = Object.keys(form).filter(e => form[e]).map(e => `${e}='${form[e]}'`) - sql = `update node_wxmp_config set ${arr.join(",")} where appid='${form.appid}'` + sql = `update node_wxmp_config set ${arr.join(",")} where appid='${form.appid}' and pid='${pid}'` } else {//新增 let cols = [], arr = [] form.appid = miniapp_appid