优化----设备下线,通道状态也切换至离线状态

This commit is contained in:
chenjialing
2022-07-20 16:52:13 +08:00
parent a51b411101
commit f66bf823fa
3 changed files with 21 additions and 4 deletions

View File

@@ -140,6 +140,9 @@ public interface DeviceChannelMapper {
@Update(value = {"UPDATE device_channel SET status=0 WHERE deviceId=#{deviceId} AND channelId=#{channelId}"})
void offline(String deviceId, String channelId);
@Update(value = {"UPDATE device_channel SET status=0 WHERE deviceId=#{deviceId}"})
void offlineByDeviceId(String deviceId);
@Update(value = {"UPDATE device_channel SET status=1 WHERE deviceId=#{deviceId} AND channelId=#{channelId}"})
void online(String deviceId, String channelId);