wenlele 1 year ago
parent
commit
6f8ba057e8
  1. 8
      api/app/lib/controllers/project/group.js

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

@ -273,7 +273,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,
@ -305,7 +305,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() : []
@ -414,7 +414,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,
@ -446,7 +446,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