From dfbfe4787ca6eae3eb1b5b1744af037bc7697221 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Wed, 10 Jun 2026 23:30:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=AA=E9=98=B3=E8=83=BD=E7=BD=91?= =?UTF-8?q?=E6=8E=A7=E6=96=B0=E5=A2=9E=E6=97=B6=E5=80=99=EF=BC=8C=E7=A6=BB?= =?UTF-8?q?=E7=BA=BF=E6=97=B6=E7=BD=AE=E7=A6=BB=E7=BA=BF=E6=9C=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8Cbug=E4=BF=AE=E5=A4=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/intc/iot/controller/IotController.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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("设备离线或关机"); // }