648540858
2021-12-20 22efd0f56c20e1aedb18fa7b9bcdc48007fcc954
src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformChannelMapper.java
@@ -26,7 +26,9 @@
    @Insert("<script> "+
            "INSERT INTO platform_gb_channel (channelId, deviceId, platformId, deviceAndChannelId) VALUES" +
            "<foreach collection='channelReducesToAdd'  item='item' separator=','> ('${item.channelId}','${item.deviceId}', '${platformId}', '${item.deviceId}_${item.channelId}' )</foreach>" +
            "<foreach collection='channelReducesToAdd'  item='item' separator=','>" +
            " ('${item.channelId}','${item.deviceId}', '${platformId}', '${item.deviceId}_${item.channelId}' )" +
            "</foreach>" +
            "</script>")
    int addChannels(String platformId, List<ChannelReduce> channelReducesToAdd);
@@ -38,6 +40,11 @@
    int delChannelForGB(String platformId, List<ChannelReduce> channelReducesToDel);
    @Delete("<script> "+
            "DELETE FROM platform_gb_channel WHERE deviceId='${deviceId}' " +
            "</script>")
    int delChannelForDeviceId(String deviceId);
    @Delete("<script> "+
            "DELETE FROM platform_gb_channel WHERE platformId='${platformId}'"  +
            "</script>")
    int cleanChannelForGB(String platformId);