增加关于标准库的筛选

This commit is contained in:
aixianling
2022-07-04 14:43:22 +08:00
parent d553307ea8
commit 43c59ec34e
2 changed files with 34 additions and 1 deletions

View File

@@ -3,9 +3,10 @@ module.exports = {
action: "/node/wechatapps/list",
method: "post",
execute: (request, response) => {
let total = 0, records = [], {size, current = 1, name = "", type} = request.query
let total = 0, records = [], {size, current = 1, name = "", type, isMain} = request.query
if (type) {
let condition = `where type='${type}' and (name like '%${name}%' or label like '%${name}%')`
isMain && (condition += ` and libPath not like '%project%'`)
Promise.all([
dbUtils.query(`select 1 from node_wechat_apps ${condition}`).then(res => {
return total = res.length