From d6747b2f8c31d2e879d4d59e19c9410c13c35228 Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Wed, 05 Jun 2019 10:55:11 +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