From d7d69146b82c66b4aa4b132e19319cab69319bd9 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 11 Oct 2022 16:42:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/alarm/data.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/api/app/lib/controllers/alarm/data.js b/api/app/lib/controllers/alarm/data.js index 25944ac..24407e3 100644 --- a/api/app/lib/controllers/alarm/data.js +++ b/api/app/lib/controllers/alarm/data.js @@ -90,9 +90,8 @@ async function list (ctx) { let alarmQueryOptionStr = ` FROM alarms - ${//LEFT JOIN DeviceStatus - //ON DeviceStatus.DeviceId = alarms.SourceId - ''} + LEFT JOIN DeviceStatus + ON DeviceStatus.DeviceId = alarms.SourceId LEFT JOIN ${anxinyun}.t_structure ON ${anxinyun}.t_structure.id = alarms.StructureId LEFT JOIN ${anxinyun}.t_alarm_code @@ -110,8 +109,7 @@ async function list (ctx) { SourceTypeId, AlarmAdviceProblem, AlarmGroup, AlarmGroupUnit, AlarmAdviceProblem, alarms.StructureId AS StructureId, - ${//`DeviceStatus.Status AS DeviceStatus,` - ''} + ${`DeviceStatus.Status AS DeviceStatus,`} ${anxinyun}.t_structure.name AS StructureName, ${anxinyun}.t_structure.longitude AS StructureLongitude, ${anxinyun}.t_structure.latitude AS StructureLatitude, From 6df4ede656107075cdf24078cbd88c3e9bc6d30a Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 12 Oct 2022 14:34:54 +0800 Subject: [PATCH 2/2] debug --- api/app/lib/service/clickHouseClient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/lib/service/clickHouseClient.js b/api/app/lib/service/clickHouseClient.js index f688681..998033a 100644 --- a/api/app/lib/service/clickHouseClient.js +++ b/api/app/lib/service/clickHouseClient.js @@ -11,7 +11,7 @@ function factory (app, opts) { app.fs.clickHouse[d.name] = new ClickHouse({ url: url, port: port, - debug: opts.dev, + debug: true || opts.dev, format: "json", basicAuth: user && password ? { username: user,