From 35e222482b26d5e672eb5939a24458fc30a7d37f Mon Sep 17 00:00:00 2001 From: chenparty <870300816@qq.com> Date: 星期日, 26 九月 2021 15:37:01 +0800 Subject: [PATCH] 修复快照无法生成的BUG --- src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java index bcc33de..68ad28d 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java @@ -27,6 +27,12 @@ "ip," + "port," + "hostAddress," + + "expires," + + "registerTime," + + "keepaliveTime," + + "createTime," + + "updateTime," + + "charset," + "online" + ") VALUES (" + "#{deviceId}," + @@ -39,13 +45,19 @@ "#{ip}," + "#{port}," + "#{hostAddress}," + + "#{expires}," + + "#{registerTime}," + + "#{keepaliveTime}," + + "#{createTime}," + + "#{updateTime}," + + "#{charset}," + "#{online}" + ")") int add(Device device); @Update(value = {" <script>" + "UPDATE device " + - "SET deviceId='${deviceId}'" + + "SET updateTime='${updateTime}'" + "<if test=\"name != null\">, name='${name}'</if>" + "<if test=\"manufacturer != null\">, manufacturer='${manufacturer}'</if>" + "<if test=\"model != null\">, model='${model}'</if>" + @@ -56,6 +68,10 @@ "<if test=\"port != null\">, port=${port}</if>" + "<if test=\"hostAddress != null\">, hostAddress='${hostAddress}'</if>" + "<if test=\"online != null\">, online=${online}</if>" + + "<if test=\"registerTime != null\">, registerTime='${registerTime}'</if>" + + "<if test=\"keepaliveTime != null\">, keepaliveTime='${keepaliveTime}'</if>" + + "<if test=\"expires != null\">, expires=${expires}</if>" + + "<if test=\"charset != null\">, charset='${charset}'</if>" + "WHERE deviceId='${deviceId}'"+ " </script>"}) int update(Device device); -- Gitblit v1.8.0