From c4f6e4672d5fae955860c7031e38636f958ac411 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Fri, 30 Aug 2024 17:29:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=A2=9E=E5=8A=A0=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/interfaces/OperationLogAspect.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java b/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java index ac1d9b1e..8c6ce736 100644 --- a/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java +++ b/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java @@ -167,7 +167,7 @@ public class OperationLogAspect { operLog.setStatus(UniversalEnum.ONE.getNumber()); //sta = UniversalEnum.LOSE.getValue(); } - + ArrayList deviceIds = new ArrayList<>(); ArrayList deviceNames = new ArrayList<>(); String deviceType = UniversalEnum.EMPTY_STRING.getValue(); @@ -512,8 +512,16 @@ public class OperationLogAspect { for (int i = UniversalEnum.ZERO.getNumber(); i < devices.size(); i++) { + JSONObject device = (JSONObject) JSON.toJSON(devices.get(i)); + + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(DcDevice::getId, device.get("id")); + DcDevice dcDevice = dcDeviceService.getById(device.getString("id")); + DcPublishManage dcPublishManage = new DcPublishManage(); + dcPublishManage.setPosition(dcDevice.getDeviceName()); + if (Objects.equals(state, UniversalEnum.ZERO.getValue()) && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), UniversalEnum.TWO_HUNDRED.getValue()) && !Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("msg")), UniversalEnum.FIVE_HUNDRED.getValue()) && status.get()) { dcPublishManage.setPublishStatus(UniversalEnum.ONE.getNumber());//发布状态1-成功2-失败 } else { @@ -540,7 +548,6 @@ public class OperationLogAspect { } } - } else if (operUrl.contains(UniversalEnum.FUNCTIONS.getValue())) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>();