From 7c849abf29dd848ee04c61f0074ae1d84705a9cf Mon Sep 17 00:00:00 2001 From: Awen <39176130+yu1183688986@users.noreply.github.com> Date: 星期五, 30 四月 2021 10:42:59 +0800 Subject: [PATCH] 修复集合遍历删除元素的java.util.ConcurrentModificationException 异常问题 --- src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java | 4 ++-- 1 files changed, 2 insertions(+), 2 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 6ab96e4..bcc33de 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 @@ -1,7 +1,6 @@ package com.genersoft.iot.vmp.storager.dao; import com.genersoft.iot.vmp.gb28181.bean.Device; -import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Repository; @@ -44,7 +43,6 @@ ")") int add(Device device); - @Update(value = {" <script>" + "UPDATE device " + "SET deviceId='${deviceId}'" + @@ -68,4 +66,6 @@ @Delete("DELETE FROM device WHERE deviceId=#{deviceId}") int del(String deviceId); + @Update("UPDATE device SET online=0") + int outlineForAll(); } -- Gitblit v1.8.0