CODE 1 year ago
parent
commit
97f8535dcb
  1. 2
      api/app/lib/schedule/alarms_push.js

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

@ -284,7 +284,7 @@ module.exports = function (app, opts) {
let deviceCountRes =
strucThingId.length ?
await clickHouse.iot.query(`
SELECT count(DeviceId) AS count FROM device WHERE ThingId IN (${strucThingId.map(t => `'${t}'`).join(',')}, '-1')
SELECT count(DeviceId) AS count FROM Device WHERE ThingId IN (${strucThingId.map(t => `'${t}'`).join(',')}, '-1')
`).toPromise()
: []
deviceCount = deviceCountRes.length ? deviceCountRes[0].count : 0

Loading…
Cancel
Save