jiang
2022-12-28 37e973949fa14d01d9ad030973a4974e2f4fef2d
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
@@ -24,6 +24,8 @@
            "transport," +
            "streamMode," +
            "ip," +
            "sdpIp," +
            "localIp," +
            "port," +
            "hostAddress," +
            "expires," +
@@ -52,6 +54,8 @@
                "transport," +
                "streamMode," +
                "ip," +
                "sdpIp," +
                "localIp," +
                "port," +
                "hostAddress," +
                "expires," +
@@ -77,6 +81,8 @@
                "#{transport}," +
                "#{streamMode}," +
                "#{ip}," +
                "#{sdpIp}," +
                "#{localIp}," +
                "#{port}," +
                "#{hostAddress}," +
                "#{expires}," +
@@ -105,6 +111,7 @@
                "<if test=\"firmware != null\">, firmware='${firmware}'</if>" +
                "<if test=\"transport != null\">, transport='${transport}'</if>" +
                "<if test=\"ip != null\">, ip='${ip}'</if>" +
                "<if test=\"localIp != null\">, localIp='${localIp}'</if>" +
                "<if test=\"port != null\">, port=${port}</if>" +
                "<if test=\"hostAddress != null\">, hostAddress='${hostAddress}'</if>" +
                "<if test=\"online != null\">, online=${online}</if>" +
@@ -115,7 +122,9 @@
            " </script>"})
    int update(Device device);
    @Select("SELECT " +
    @Select(
            " <script>" +
            "SELECT " +
            "deviceId, " +
            "coalesce(custom_name, name) as name, " +
            "password, " +
@@ -125,6 +134,8 @@
            "transport," +
            "streamMode," +
            "ip," +
            "sdpIp," +
            "localIp," +
            "port," +
            "hostAddress," +
            "expires," +
@@ -141,8 +152,11 @@
            "geoCoordSys," +
            "treeType," +
            "online," +
            "(SELECT count(0) FROM device_channel WHERE deviceId=de.deviceId) as channelCount  FROM device de")
    List<Device> getDevices();
            "(SELECT count(0) FROM device_channel WHERE deviceId=de.deviceId) as channelCount  FROM device de" +
            "<if test=\"online != null\"> where online=${online}</if>"+
            " </script>"
    )
    List<Device> getDevices(Boolean online);
    @Delete("DELETE FROM device WHERE deviceId=#{deviceId}")
    int del(String deviceId);
@@ -160,6 +174,8 @@
            "transport," +
            "streamMode," +
            "ip," +
            "sdpIp," +
            "localIp," +
            "port," +
            "hostAddress," +
            "expires," +
@@ -188,6 +204,8 @@
            "transport," +
            "streamMode," +
            "ip," +
            "sdpIp," +
            "localIp," +
            "port," +
            "hostAddress," +
            "expires," +
@@ -214,6 +232,7 @@
            "<if test=\"password != null\">, password='${password}'</if>" +
            "<if test=\"streamMode != null\">, streamMode='${streamMode}'</if>" +
            "<if test=\"ip != null\">, ip='${ip}'</if>" +
            "<if test=\"sdpIp != null\">, sdpIp='${sdpIp}'</if>" +
            "<if test=\"port != null\">, port=${port}</if>" +
            "<if test=\"charset != null\">, charset='${charset}'</if>" +
            "<if test=\"subscribeCycleForCatalog != null\">, subscribeCycleForCatalog=${subscribeCycleForCatalog}</if>" +
@@ -232,6 +251,7 @@
            "deviceId, " +
            "custom_name, " +
            "password, " +
            "sdpIp, " +
            "createTime," +
            "updateTime," +
            "charset," +
@@ -243,6 +263,7 @@
            "#{deviceId}," +
            "#{name}," +
            "#{password}," +
            "#{sdpIp}," +
            "#{createTime}," +
            "#{updateTime}," +
            "#{charset}," +