|
@@ -201,6 +201,21 @@ public class OpenDeviceFactoryImpl implements DeviceFactory {
|
|
|
return R.ok(result);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R restActive(MercMiniDeviceDto.RestActive restActive) {
|
|
|
+ deviceChargingService.removeById(restActive.getDeviceId());
|
|
|
+ deviceAlgorithmChargingService.remove(new LambdaQueryWrapper<DeviceAlgorithmCharging>()
|
|
|
+ .eq(DeviceAlgorithmCharging::getDeviceId, restActive.getDeviceId())
|
|
|
+ );
|
|
|
+ DeviceInfo deviceInfo = new DeviceInfo()
|
|
|
+ .setActiveState(2)
|
|
|
+ .setActiveTime(null);
|
|
|
+ deviceInfoService.update(deviceInfo, new LambdaQueryWrapper<DeviceInfo>()
|
|
|
+ .eq(DeviceInfo::getDeviceId, restActive.getDeviceId())
|
|
|
+ );
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public R<List<Tuple.Tuple3<Long, Long, Boolean>>> senCommand(List<CommandMqtt> commandMqtts) {
|
|
|
//发送指令
|