648540858
2023-03-31 1421b4743ca8c6f32984bfd9e213f8018035e7ae
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
@@ -42,7 +42,9 @@
            "asMessageChannel," +
            "geoCoordSys," +
            "treeType," +
            "online" +
            "online," +
            "mediaServerId," +
            "(SELECT count(0) FROM device_channel WHERE deviceId=device.deviceId) as channelCount "+
            " FROM device WHERE deviceId = #{deviceId}")
    Device getDeviceByDeviceId(String deviceId);
@@ -159,6 +161,7 @@
            "geoCoordSys," +
            "treeType," +
            "online," +
            "mediaServerId," +
            "(SELECT count(0) FROM device_channel WHERE deviceId=de.deviceId) as channelCount  FROM device de" +
            "<if test=\"online != null\"> where online=${online}</if>"+
            " </script>"
@@ -269,7 +272,8 @@
            "asMessageChannel," +
            "geoCoordSys," +
            "treeType," +
            "online" +
            "online," +
            "mediaServerId" +
            ") VALUES (" +
            "#{deviceId}," +
            "#{name}," +
@@ -282,7 +286,8 @@
            "#{asMessageChannel}," +
            "#{geoCoordSys}," +
            "#{treeType}," +
            "#{online}" +
            "#{online}," +
            "#{mediaServerId}" +
            ")")
    void addCustomDevice(Device device);