From cb4db82b27bcedc1851e4ac190bdcd3ddf70a249 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Tue, 25 Feb 2025 11:26:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E7=A6=81=E5=88=A4=E7=A9=BA=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/controller/DcDeviceController.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java b/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java index 0a0a9dfb..d8dd0029 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java @@ -1751,6 +1751,9 @@ private VideoController videoController; continue; } JSONObject data = (JSONObject) result.get("data");//属性全部值 + if (data==null){ + continue; + } String value = data.get("value").toString();//属性值 if ("1".equals(value)){//机箱门状态为开 String cacheMapValue = redisCache.getCacheMapValue(DOORSTATUS, device.getIotDeviceId());//查询缓存 @@ -1806,7 +1809,13 @@ private VideoController videoController; continue; } JSONObject data = (JSONObject) result.get("data");//属性全部值 + if (data==null){ + continue; + } JSONObject value = (JSONObject) data.get("value"); + if (value==null){ + continue; + } String doorStatus = value.get("door_status").toString();//属性值 if ("1".equals(doorStatus)){//机箱门状态为开 String cacheMapValue = redisCache.getCacheMapValue(DOORSTATUS, device.getIotDeviceId());//查询缓存 @@ -1844,7 +1853,7 @@ private VideoController videoController; } } } - return null; + return AjaxResult.success(); } @GetMapping("/dcDoorList")