lin преди 3 години
родител
ревизия
486eb18092
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/service/impl/DeviceServiceImpl.java

+ 2 - 2
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/service/impl/DeviceServiceImpl.java

@@ -635,8 +635,8 @@ public class DeviceServiceImpl implements DeviceService{
         }
         if (syncDeviceService.updateDeviceStatus(device.getIotDeviceId(), state) > 0){
             Device DeviceUpdate = new Device();
-            device.setId(deviceId);
-            device.setDeviceStatus(state);
+            DeviceUpdate.setId(deviceId);
+            DeviceUpdate.setDeviceStatus(state);
             updateByPrimaryKeySelective(DeviceUpdate);
             return;
         }