diff --git a/src/rest/wechatapps/add.js b/src/rest/wechatapps/add.js index f7661ac..9b0ddf8 100644 --- a/src/rest/wechatapps/add.js +++ b/src/rest/wechatapps/add.js @@ -4,7 +4,7 @@ const addOrUpdate = form => { return dbUtils.query(`select 1 from node_wechat_apps where id='${form.id}'`).then(res => { if (res.length > 0) {//编辑 let arr = Object.keys(form).filter(e => form[e]).map(e => `${e}='${form[e]}'`) - return `update node_wechat_apps set ${arr.join(",")} where id='${form.name}' and type='${form.type}'` + return `update node_wechat_apps set ${arr.join(",")} where id='${form.id}' and type='${form.type}'` } else {//新增 let cols = [], arr = [] Object.keys(form).map(e => {