From 4ffcc9ca554e2b541d5e00c2d61d5835708e2190 Mon Sep 17 00:00:00 2001 From: xufenglei <xufenglei> Date: Wed, 07 Nov 2018 10:14:23 +0800 Subject: [PATCH] 获取 组织下的监控点和设备数据 --- src/main/java/com/moral/common/aop/ControllerAOP.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/moral/common/aop/ControllerAOP.java b/src/main/java/com/moral/common/aop/ControllerAOP.java index 1b6072d..9e7c357 100644 --- a/src/main/java/com/moral/common/aop/ControllerAOP.java +++ b/src/main/java/com/moral/common/aop/ControllerAOP.java @@ -53,7 +53,10 @@ Method currentMethod = target.getClass().getMethod(msig.getName(), msig.getParameterTypes()); Type type = currentMethod.getGenericReturnType(); String message = e.getMessage(); + Map<String, Object> resultMap = new HashMap<String, Object>(); if (e instanceof BusinessException) { + log.error(e.getMessage()); + resultMap.put("msg", message); } else if (e instanceof ValidateException) { } else { log.error(pjp.getSignature() + " error: " + e.toString(), e); @@ -66,7 +69,6 @@ } else if (type == ResultBean.class) { return new ResultBean(e); } else if (type == Map.class) { - Map<String, Object> resultMap = new HashMap<String, Object>(); resultMap.put("msg", message); return resultMap; } else if (type == Void.TYPE) { -- Gitblit v1.8.0