zhaobing’ 1 year ago
parent
commit
61e3d8a697
  1. 8
      api/app/lib/schedule/alarms_push.js

8
api/app/lib/schedule/alarms_push.js

@ -318,14 +318,18 @@ module.exports = function (app, opts) {
if (c.alarmSubType) dataAlarmSubType = dataAlarmSubType.concat(c.alarmSubType['strategy_hit'])
}
if (c.alarmType.includes('video_exception')) {
let videoAlarmSubType = c.alarmSubType ? c.alarmSubType['video_exception'] : []
let videoAlarmSubType = c.alarmSubType ?
(
c.alarmSubType['video_exception'] || []
) : []
if (videoAlarmSubType && videoAlarmSubType.length == 1) {
// 一个参数的时候不能兼容 sql 的 in 方法 in (1,2,3)
videoAlarmSubType.push(-1)
}
videoAlarms =
searchStrucIds.length && (
!c.alarmSubType || videoAlarmSubType.length > 0
!c.alarmSubType ||
(videoAlarmSubType && videoAlarmSubType.length > 0)
) ?
await clickHouse.vcmp.query(
`

Loading…
Cancel
Save