diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java index 8f158e29..b30ca19b 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java @@ -42,7 +42,8 @@ public interface DeviceMapper { "asMessageChannel," + "geoCoordSys," + "treeType," + - "online" + + "online," + + "(SELECT count(0) FROM device_channel WHERE deviceId=device.deviceId) as channelCount "+ " FROM device WHERE deviceId = #{deviceId}") Device getDeviceByDeviceId(String deviceId);