增加详情接口

This commit is contained in:
aixianling
2022-07-04 10:01:33 +08:00
parent 5b437886eb
commit 3334a68f06
2 changed files with 16 additions and 0 deletions

View File

@@ -70,5 +70,8 @@ module.exports = {
ids = ids?.split(",")?.map(e => `'${e}'`)?.toString()
return query(`delete from ${table} where id in (${ids})`)
},
detail: ({table, id}) => {
return query(`select * from ${table} where id='${id}' limit 0,1`)
},
format: args => args.map(e => `${e.prop}`).join(" ")
}