合并271 notify消息优化

This commit is contained in:
648540858
2024-09-26 14:46:08 +08:00
parent 394cf7ee4e
commit 249bdf69be
5 changed files with 103 additions and 64 deletions

View File

@@ -688,18 +688,10 @@ public interface DeviceChannelMapper {
@Update({"<script>" +
"<foreach collection='channels' item='item' separator=';'>" +
"UPDATE wvp_device_channel SET status='ON' WHERE device_id=#{item.deviceId}" +
"UPDATE wvp_device_channel SET status=#{item.status} WHERE device_id=#{item.deviceId}" +
"</foreach>" +
"</script>"})
int batchOnlineForNotify(List<DeviceChannel> channels);
@Update({"<script>" +
"<foreach collection='channels' item='item' separator=';'>" +
"UPDATE wvp_device_channel SET status='OFF' WHERE device_id=#{item.deviceId}" +
"</foreach>" +
"</script>"})
int batchOfflineForNotify(List<DeviceChannel> channels);
int batchUpdateStatus(List<DeviceChannel> channels);
@Select("select count(1) from wvp_device_channel where status = 'ON'")
int getOnlineCount();