|
@@ -201,6 +201,20 @@ 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())
|
|
|
+ );
|
|
|
+ deviceInfoService.update(new LambdaUpdateWrapper<DeviceInfo>()
|
|
|
+ .set(DeviceInfo::getActiveState, 2)
|
|
|
+ .set(DeviceInfo::getActiveTime, null)
|
|
|
+ .eq(DeviceInfo::getDeviceId, restActive.getDeviceId())
|
|
|
+ );
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public R<List<Tuple.Tuple3<Long, Long, Boolean>>> senCommand(List<CommandMqtt> commandMqtts) {
|
|
|
//发送指令
|