From 69d9692f6194d1e03ec81cf87ea8f0e7a62f7173 Mon Sep 17 00:00:00 2001
From: wangyimeng <421132955@qq.com>
Date: 星期三, 16 三月 2022 15:27:12 +0800
Subject: [PATCH] 删除重复字段
---
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