From 9a8498f1dbe3b7362a1a90682edfe062517e42c2 Mon Sep 17 00:00:00 2001 From: ZhuDongming <773644075@qq.com> Date: Thu, 25 Jul 2019 14:29:27 +0800 Subject: [PATCH] 新增无人机在时间段查询sensor值的sql语句 --- 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