From 6f8ba057e85e40a6e6993128f896a843eda8b5b8 Mon Sep 17 00:00:00 2001 From: wenlele Date: Tue, 5 Sep 2023 17:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/project/group.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/app/lib/controllers/project/group.js b/api/app/lib/controllers/project/group.js index f47cd73..926c53d 100644 --- a/api/app/lib/controllers/project/group.js +++ b/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() : []