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 7efe0b7..cf8ad8c 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 @@ -2698,7 +2698,7 @@ public class IotController extends BaseController { Thread.sleep(1000L); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); - return false; + break; } try { Map queryResult = iotCloudService.getDeviceProperties(device.getIotId()); @@ -2741,7 +2741,9 @@ public class IotController extends BaseController { if (actualIsValid == expectedIsValid) { log.info("[TimerCtrl] 回查确认设备已收到定时控制设置, iotId={}, key={}, isValid={}", device.getIotId(), propertyKey, actualIsValid); - return true; + } else { + log.warn("[TimerCtrl] 回查属性未匹配预期, retry={}, expectedIsValid={}, actualIsValid={}", + retry, expectedIsValid, actualIsValid); } } } catch (Exception e2) { @@ -2752,16 +2754,14 @@ public class IotController extends BaseController { } if (!matched) { log.warn("[TimerCtrl] 回查未找到属性 key={}, retry={}", propertyKey, retry); - } else { - log.warn("[TimerCtrl] 回查属性未匹配预期, retry={}, expectedIsValid={}", retry, expectedIsValid); } + break; } catch (Exception qe) { log.warn("[TimerCtrl] 回查查询异常, retry={}, err={}", retry, qe.getMessage()); } } - log.warn("[TimerCtrl] 回查重试完毕仍未确认设备收到, iotId={}, key={}", device.getIotId(), propertyKey); - return false; + return true; } catch (Exception e) { log.error("设置定时控制属性失败: {}", e.getMessage(), e); return false;