From d38ccc257c252e031363aef6c8fa19aff1a65692 Mon Sep 17 00:00:00 2001 From: chenzhangyue Date: Thu, 31 Aug 2023 17:36:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=A1=A8=E5=8D=95=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BF=AE=E5=A4=8D=EF=BC=8C=E8=BF=99=E9=87=8Cupdate?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E4=B8=BA=E6=9F=A5=E5=87=BA=E6=9D=A5=E7=9A=84?= =?UTF-8?q?DO=EF=BC=8C=E4=B8=8D=E6=98=AF=E5=89=8D=E7=AB=AF=E7=9A=84DO?= =?UTF-8?q?=EF=BC=8C=E9=87=87=E7=94=A8=E6=9B=B4=E5=AE=89=E5=85=A8=E7=9A=84?= =?UTF-8?q?redis=E7=AD=96=E7=95=A5=EF=BC=8C=E6=9B=B4=E6=96=B0DB=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E7=BC=93=E5=AD=98=EF=BC=8C=E6=9F=A5=E8=AF=A2=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=9A=84=E6=97=B6=E5=80=99=E8=A1=A5=E5=85=85=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/impl/DeviceServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java index 166b1922..1dc50f00 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java @@ -544,18 +544,19 @@ public class DeviceServiceImpl implements IDeviceService { if (deviceInStore.getGeoCoordSys() != null) { // 坐标系变化,需要重新计算GCJ02坐标和WGS84坐标 if (!deviceInStore.getGeoCoordSys().equals(device.getGeoCoordSys())) { - updateDeviceChannelGeoCoordSys(device); + deviceInStore.setGeoCoordSys(device.getGeoCoordSys()); + updateDeviceChannelGeoCoordSys(deviceInStore); } }else { - device.setGeoCoordSys("WGS84"); + deviceInStore.setGeoCoordSys("WGS84"); } if (device.getCharset() == null) { - device.setCharset("GB2312"); + deviceInStore.setCharset("GB2312"); } // 更新redis - redisCatchStorage.updateDevice(device); - deviceMapper.updateCustom(device); + deviceMapper.updateCustom(deviceInStore); + redisCatchStorage.removeDevice(deviceInStore.getDeviceId()); } @Override