From 224e9043060d9831cd08445ea8d91411e959ac34 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: Fri, 8 Jan 2021 14:46:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=92=8C=E9=80=9A=E9=81=93=E4=BF=A1=E6=81=AF=E6=97=B6?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E5=AD=97=E6=AE=B5=E6=98=AF=E5=90=A6=E5=AD=98?= =?UTF-8?q?=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmp/storager/dao/DeviceChannelMapper.java | 43 ++++++++++++++++--- .../iot/vmp/storager/dao/DeviceMapper.java | 27 ++++++------ 2 files changed, 51 insertions(+), 19 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 eecc0bb5..9312f23f 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 @@ -19,13 +19,42 @@ public interface DeviceChannelMapper { "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status})") int add(DeviceChannel channel); - @Update("UPDATE device_channel " + - "SET name=#{name}, manufacture=#{manufacture}, model=#{model}, owner=#{owner}, civilCode=#{civilCode}, " + - "block=#{block}, address=#{address}, parental=#{parental}, parentId=#{parentId}, safetyWay=#{safetyWay}, " + - "registerWay=#{registerWay}, certNum=#{certNum}, certifiable=#{certifiable}, errCode=#{errCode}, secrecy=#{secrecy}, " + - "ipAddress=#{ipAddress}, port=#{port}, password=#{password}, PTZType=#{PTZType}, status=#{status}, streamId=#{streamId}, " + - "hasAudio=#{hasAudio}" + - "WHERE deviceId=#{deviceId} AND channelId=#{channelId}") +// @Update("UPDATE device_channel " + +// "SET name=#{name}, manufacture=#{manufacture}, model=#{model}, owner=#{owner}, civilCode=#{civilCode}, " + +// "block=#{block}, address=#{address}, parental=#{parental}, parentId=#{parentId}, safetyWay=#{safetyWay}, " + +// "registerWay=#{registerWay}, certNum=#{certNum}, certifiable=#{certifiable}, errCode=#{errCode}, secrecy=#{secrecy}, " + +// "ipAddress=#{ipAddress}, port=#{port}, password=#{password}, PTZType=#{PTZType}, status=#{status}, streamId=#{streamId}, " + +// "hasAudio=#{hasAudio}" + +// "WHERE deviceId=#{deviceId} AND channelId=#{channelId}") + + + @Update(value = {" "}) int update(DeviceChannel channel); @Select(value = {" "}) int update(Device device); @Select("SELECT *, (SELECT count(0) FROM device_channel WHERE deviceId=de.deviceId) as channelCount FROM device de")