Merge pull request #1045 from lunasaw/wvp-dev-0830

code review
pull/1055/head
648540858 2023-09-01 09:18:26 +08:00 committed by GitHub
commit 393d25f739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -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