Commit 393d25f73999a1df5fbdd4c8cf92250c39f11215

Authored by 648540858
Committed by GitHub
2 parents 9a64be46 d38ccc25

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

code review
src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
... ... @@ -544,18 +544,19 @@ public class DeviceServiceImpl implements IDeviceService {
544 544 if (deviceInStore.getGeoCoordSys() != null) {
545 545 // 坐标系变化,需要重新计算GCJ02坐标和WGS84坐标
546 546 if (!deviceInStore.getGeoCoordSys().equals(device.getGeoCoordSys())) {
547   - updateDeviceChannelGeoCoordSys(device);
  547 + deviceInStore.setGeoCoordSys(device.getGeoCoordSys());
  548 + updateDeviceChannelGeoCoordSys(deviceInStore);
548 549 }
549 550 }else {
550   - device.setGeoCoordSys("WGS84");
  551 + deviceInStore.setGeoCoordSys("WGS84");
551 552 }
552 553 if (device.getCharset() == null) {
553   - device.setCharset("GB2312");
  554 + deviceInStore.setCharset("GB2312");
554 555 }
555 556  
556 557 // 更新redis
557   - redisCatchStorage.updateDevice(device);
558   - deviceMapper.updateCustom(device);
  558 + deviceMapper.updateCustom(deviceInStore);
  559 + redisCatchStorage.removeDevice(deviceInStore.getDeviceId());
559 560 }
560 561  
561 562 @Override
... ...