From 8f5bbfa5c2bf7cfc50acbdff63e1a1a38800c1e6 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 13 六月 2023 23:06:35 +0800 Subject: [PATCH] 修复zlm上线时过期任务设置错误 --- src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java index 1ce01df..cee613d 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java @@ -184,10 +184,10 @@ if (i + limitCount > channels.size()) { toIndex = channels.size(); } - result = result || deviceChannelMapper.batchAdd(channels.subList(i, toIndex)) < 0; + result = result || deviceChannelMapper.batchAddOrUpdate(channels.subList(i, toIndex)) < 0; } }else { - result = result || deviceChannelMapper.batchAdd(channels) < 0; + result = result || deviceChannelMapper.batchAddOrUpdate(channels) < 0; } } if (result) { @@ -285,10 +285,10 @@ if (i + limitCount > addChannels.size()) { toIndex = addChannels.size(); } - result = result || deviceChannelMapper.batchAdd(addChannels.subList(i, toIndex)) < 0; + result = result || deviceChannelMapper.batchAddOrUpdate(addChannels.subList(i, toIndex)) < 0; } }else { - result = result || deviceChannelMapper.batchAdd(addChannels) < 0; + result = result || deviceChannelMapper.batchAddOrUpdate(addChannels) < 0; } } if (updateChannels.size() > 0) { @@ -441,9 +441,6 @@ */ @Override public synchronized boolean insertMobilePosition(MobilePosition mobilePosition) { - if (mobilePosition.getDeviceId().equals(mobilePosition.getChannelId())) { - mobilePosition.setChannelId(null); - } return deviceMobilePositionMapper.insertNewPosition(mobilePosition) > 0; } -- Gitblit v1.8.0