From 57e6cdefdf339cc162594bccef9f513b65562789 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 16 三月 2022 16:46:18 +0800
Subject: [PATCH] #401
---
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
index 5e6ffed..e4fc1eb 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
+++ b/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);
}
--
Gitblit v1.8.0