修复产品库接口

This commit is contained in:
aixianling
2022-05-27 15:11:55 +08:00
parent 64f0cf5708
commit 45c1a4f043

View File

@@ -4,7 +4,7 @@ const addOrUpdate = form => {
return dbUtils.query(`select 1 from node_wechat_apps where id='${form.id}'`).then(res => { return dbUtils.query(`select 1 from node_wechat_apps where id='${form.id}'`).then(res => {
if (res.length > 0) {//编辑 if (res.length > 0) {//编辑
let arr = Object.keys(form).filter(e => form[e]).map(e => `${e}='${form[e]}'`) 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 {//新增 } else {//新增
let cols = [], arr = [] let cols = [], arr = []
Object.keys(form).map(e => { Object.keys(form).map(e => {