CODE 1 year ago
parent
commit
9702c95f1b
  1. 8
      api/app/lib/controllers/project/group.js

8
api/app/lib/controllers/project/group.js

@ -275,7 +275,7 @@ async function groupStatisticOnline (ctx) {
}
// 统计安心云项目下的结构物
const strucRes = anxinProjectIds.length ? await clickHouse.anxinyun.query(
const strucRes = anxinProjectIds.size ? await clickHouse.anxinyun.query(
`
SELECT
t_project.id AS projectId,
@ -307,7 +307,7 @@ async function groupStatisticOnline (ctx) {
WHERE
project_state != -1
AND
t_project.id IN (${anxinProjectIds.join(',')},-1)
t_project.id IN (${[...anxinProjectIds].join(',')},-1)
`
).toPromise() : []
@ -416,7 +416,7 @@ async function groupStatisticAlarm (ctx) {
}
// 统计安心云项目下的结构物
const strucRes = anxinProjectIds.length ? await clickHouse.anxinyun.query(
const strucRes = anxinProjectIds.size ? await clickHouse.anxinyun.query(
`
SELECT
t_project.id AS projectId,
@ -448,7 +448,7 @@ async function groupStatisticAlarm (ctx) {
WHERE
project_state != -1
AND
t_project.id IN (${anxinProjectIds.join(',')},-1)
t_project.id IN (${[...anxinProjectIds].join(',')},-1)
`
).toPromise() : []

Loading…
Cancel
Save