Răsfoiți Sursa

重置设备激活

lijin 7 luni în urmă
părinte
comite
4beb074ff1

+ 3 - 4
device-api-service/src/main/java/com/xy/service/factory/device/impl/open/OpenDeviceFactoryImpl.java

@@ -207,10 +207,9 @@ public class OpenDeviceFactoryImpl implements DeviceFactory {
         deviceAlgorithmChargingService.remove(new LambdaQueryWrapper<DeviceAlgorithmCharging>()
         deviceAlgorithmChargingService.remove(new LambdaQueryWrapper<DeviceAlgorithmCharging>()
                 .eq(DeviceAlgorithmCharging::getDeviceId, restActive.getDeviceId())
                 .eq(DeviceAlgorithmCharging::getDeviceId, restActive.getDeviceId())
         );
         );
-        DeviceInfo deviceInfo = new DeviceInfo()
-                .setActiveState(2)
-                .setActiveTime(null);
-        deviceInfoService.update(deviceInfo, new LambdaQueryWrapper<DeviceInfo>()
+        deviceInfoService.update(new LambdaUpdateWrapper<DeviceInfo>()
+                .set(DeviceInfo::getActiveState, 2)
+                .set(DeviceInfo::getActiveTime, null)
                 .eq(DeviceInfo::getDeviceId, restActive.getDeviceId())
                 .eq(DeviceInfo::getDeviceId, restActive.getDeviceId())
         );
         );
         return R.ok();
         return R.ok();