648540858
2022-03-14 bde0e13682ed75d2e8c0cb8a1fd6a96bb92f1dd8
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
@@ -247,4 +247,13 @@
            "<foreach collection='channels'  item='item'  open='(' separator=',' close=')' > #{item.channelId}</foreach>" +
            " </script>"})
    int cleanChannelsNotInList(String deviceId, List<DeviceChannel> channels);
    @Update(" update device_channel" +
            " set subCount = (select *" +
            "                from (select count(0)" +
            "                      from device_channel" +
            "                      where deviceId = #{deviceId} and parentId = #{channelId}) as temp)" +
            " where deviceId = #{deviceId} " +
            " and channelId = #{channelId}")
    int updateChannelSubCount(String deviceId, String channelId);
}