From fc6973a79d7d91f622908852e5b647e313598d5a Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 16 Nov 2022 09:00:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=91=8A=E8=AD=A6=20statusId?= =?UTF-8?q?=20=E7=AD=9B=E9=80=89=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/.vscode/settings.json | 6 ++++++ api/app/lib/controllers/alarm/video.js | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 api/.vscode/settings.json diff --git a/api/.vscode/settings.json b/api/.vscode/settings.json new file mode 100644 index 0000000..bc4fb95 --- /dev/null +++ b/api/.vscode/settings.json @@ -0,0 +1,6 @@ +// 将设置放入此文件中以覆盖默认值和用户设置。 +{ + "editor.fontSize": 16, + "eslint.format.enable": true, + "editor.tabSize": 3, +} \ No newline at end of file diff --git a/api/app/lib/controllers/alarm/video.js b/api/app/lib/controllers/alarm/video.js index 3c7a959..5ba4718 100644 --- a/api/app/lib/controllers/alarm/video.js +++ b/api/app/lib/controllers/alarm/video.js @@ -27,7 +27,7 @@ async function alarmList (ctx) { const { clickHouse } = ctx.app.fs const { utils: { judgeSuper, anxinStrucIdRange } } = ctx.app.fs const { database: anxinyun } = clickHouse.anxinyun.opts.config - const { pepProjectId, keywordTarget, keyword, state, kindId, sustainTimeStart, sustainTimeEnd, limit, page, } = ctx.query + const { pepProjectId, keywordTarget, keyword, state, kindId, sustainTimeStart, sustainTimeEnd, limit, page, statusId} = ctx.query let anxinStruc = await anxinStrucIdRange({ ctx, pepProjectId, keywordTarget, keyword @@ -71,6 +71,9 @@ async function alarmList (ctx) { ) `) } + if(statusId){ + statusAlarmWhereOption.push(`camera_status_alarm.status_id = ${statusId}`) + } const queryStr = ` SELECT