兼容异常

This commit is contained in:
aixianling
2022-07-18 15:03:41 +08:00
parent bf60b7f257
commit b94455ed76

View File

@@ -8,7 +8,7 @@ module.exports = {
data.apps = JSON.parse(data.apps || "[]") data.apps = JSON.parse(data.apps || "[]")
data.extra = JSON.parse(data.extra || null) data.extra = JSON.parse(data.extra || null)
Promise.all([ Promise.all([
dbUtils.query(`select * from node_wechat_apps where id in (null,${data.apps?.map(e=>`'${e}'`)?.toString()})`) dbUtils.query(`select * from node_wechat_apps where id in (${data.apps?.map(e=>`'${e}'`)?.toString()||202207181503})`)
.then(res => data.appList = [data.appList, res].flat()), .then(res => data.appList = [data.appList, res].flat()),
dbUtils.query(`select * from node_wechat_apps where type='${data.type}' and id like '%project_${data.customPath}%'`) dbUtils.query(`select * from node_wechat_apps where type='${data.type}' and id like '%project_${data.customPath}%'`)
.then(res => data.appList = [data.appList, res].flat()) .then(res => data.appList = [data.appList, res].flat())