diff --git a/intc-modules/intc-iot/src/main/java/com/intc/iot/controller/IotController.java b/intc-modules/intc-iot/src/main/java/com/intc/iot/controller/IotController.java index 2e1dd2a..cb6794a 100644 --- a/intc-modules/intc-iot/src/main/java/com/intc/iot/controller/IotController.java +++ b/intc-modules/intc-iot/src/main/java/com/intc/iot/controller/IotController.java @@ -1545,7 +1545,7 @@ public class IotController extends BaseController { } else { // 检查是否已过期 if (device.getDeadTime() != null && now.after(device.getDeadTime())) { - warnCode |= 0x0040; // 设备时间到期 (0x0040) + warnCode |= DefineDeviceWarnCode.DeviceTimeDead; } } @@ -1643,7 +1643,7 @@ public class IotController extends BaseController { // 如果设备离线,添加离线警告 if (status != null && "OFFLINE".equalsIgnoreCase(status)) { - warnCode |= 0x0080; // 设备离线 (0x0080) + warnCode |= DefineDeviceWarnCode.DeviceOffline; } device.setWarnCode(warnCode); @@ -1857,7 +1857,7 @@ public class IotController extends BaseController { // 如果设备离线,添加离线警告 if (isOffline) { - warnCode |= 0x0080; // 设备离线 + warnCode |= DefineDeviceWarnCode.DeviceSleeping; } device.setWarnCode(warnCode); @@ -2939,8 +2939,8 @@ public class IotController extends BaseController { return R.fail("设备服务已过期"); } -// // 检查设备是否离线(warnCode & 0x0080) -// if (device.getWarnCode() != null && (device.getWarnCode() & 0x0080) != 0) { +// // 检查设备是否离线 +// if (device.getWarnCode() != null && (device.getWarnCode() & DefineDeviceWarnCode.DeviceOffline) != 0) { // return R.fail("设备离线或关机"); // } @@ -3246,8 +3246,8 @@ public class IotController extends BaseController { return R.fail("设备服务已过期"); } -// // 检查设备是否离线(warnCode & 0x0080) -// if (device.getWarnCode() != null && (device.getWarnCode() & 0x0080) != 0) { +// // 检查设备是否离线 +// if (device.getWarnCode() != null && (device.getWarnCode() & DefineDeviceWarnCode.DeviceOffline) != 0) { // return R.fail("设备离线或关机"); // }