修复更新
This commit is contained in:
@@ -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}'`
|
return `update node_wechat_apps set ${arr.join(",")} where id='${form.name}' and type='${form.type}'`
|
||||||
} else {//新增
|
} else {//新增
|
||||||
let cols = [], arr = []
|
let cols = [], arr = []
|
||||||
Object.keys(form).map(e => {
|
Object.keys(form).map(e => {
|
||||||
|
|||||||
Reference in New Issue
Block a user