整合列表工具类

This commit is contained in:
aixianling
2022-07-02 15:16:30 +08:00
parent e86b8b2f46
commit 716b80eedd

View File

@@ -34,7 +34,7 @@ module.exports = {
query(`select 1 from ${table} where name like '%${con}%' ${sqlCon}`).then(res => {
return total = res.length
}),
query(`select * from ${table} where name like '%${con}%' ${sqlCon} limit ${(current-1)*size},${size}`).then(res => {
query(`select * from ${table} where name like '%${con}%' ${sqlCon} limit ${(current-1)*size},${size||10}`).then(res => {
return records = res
})
]).then(() => {