下发离线异常修改

V0.5.x
xiwa 2022-04-12 03:03:07 +08:00
parent a3adfcf5c9
commit 342ca153ef
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package cc.iotkit.manager.service;
import cc.iotkit.common.exception.BizException;
import cc.iotkit.common.exception.NotFoundException;
import cc.iotkit.common.exception.OfflineException;
import cc.iotkit.common.utils.UniqueIdUtil;
import cc.iotkit.comps.ComponentManager;
import cc.iotkit.converter.ThingService;
@ -41,7 +42,7 @@ public class DeviceService {
dataOwnerService.checkOwner(device);
}
if (!device.getState().isOnline()) {
throw new BizException("device is offline");
throw new OfflineException("device is offline");
}
ThingService<?> thingService = ThingService.builder()
@ -71,7 +72,7 @@ public class DeviceService {
dataOwnerService.checkOwner(device);
}
if (!device.getState().isOnline()) {
throw new BizException("device is offline");
throw new OfflineException("device is offline");
}
ThingService<?> thingService = ThingService.builder()