|
|
@ -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(id) AS count FROM Device WHERE thingId IN (${strucThingId.map(t => `'${t}'`).join(',')}, '-1') |
|
|
|
`).toPromise()
|
|
|
|
: [] |
|
|
|
deviceCount = deviceCountRes.length ? deviceCountRes[0].count : 0 |
|
|
|