|
|
@ -902,7 +902,12 @@ module.exports = function (app, opts) { |
|
|
|
const device4Search = [...deviceIds] |
|
|
|
.map(id => "'" + id + "'") |
|
|
|
deviceSensorRes = await clickHouse.anxinyun.query(` |
|
|
|
SELECT iota_device_id, sensor FROM t_device_sensor WHERE iota_device_id IN (${device4Search.join(',')}, '-1') |
|
|
|
SELECT |
|
|
|
iota_device_id, sensor |
|
|
|
FROM t_device_sensor |
|
|
|
WHERE iota_device_id |
|
|
|
${device4Search.length > 1 ? `IN (${device4Search.join(',')})` : `= ${device4Search[0]}`} |
|
|
|
|
|
|
|
`).toPromise()
|
|
|
|
} |
|
|
|
if (proDebug) { |
|
|
|