Browse Source

视频告警分页

dev
巴林闲侠 2 years ago
parent
commit
6bc0e9191a
  1. 4
      api/app/lib/controllers/alarm/video.js

4
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, } = ctx.query
const { pepProjectId, keywordTarget, keyword, state, kindId, sustainTimeStart, sustainTimeEnd, limit, page, } = ctx.query
let anxinStruc = await anxinStrucIdRange({
ctx, pepProjectId, keywordTarget, keyword
@ -128,6 +128,8 @@ async function alarmList (ctx) {
${`WHERE ${anxinyun}.t_video_ipc.structure IN (${anxinStrucIds.join(',')})`
}
)
${limit ? 'LIMIT ' + limit : ''}
${limit && page ? 'OFFSET ' + parseInt(limit) * parseInt(page) : ''}
) AS cameraAlarm
LEFT JOIN camera_status
ON cameraAlarm.platform = camera_status.platform

Loading…
Cancel
Save