From 409696535bdc86f09b57582a355087a2120cb74c Mon Sep 17 00:00:00 2001
From: xufenglei <xufenglei>
Date: Tue, 19 Dec 2017 11:33:57 +0800
Subject: [PATCH] update

---
 src/main/java/com/moral/common/aop/ControllerAOP.java |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/moral/common/aop/ControllerAOP.java b/src/main/java/com/moral/common/aop/ControllerAOP.java
index a30d404..8c90a0b 100644
--- a/src/main/java/com/moral/common/aop/ControllerAOP.java
+++ b/src/main/java/com/moral/common/aop/ControllerAOP.java
@@ -13,6 +13,7 @@
 import org.aspectj.lang.reflect.MethodSignature;
 import org.springframework.stereotype.Component;
 
+import com.moral.common.bean.AppData;
 import com.moral.common.bean.ResultBean;
 import com.moral.common.exception.BusinessException;
 import com.moral.common.exception.ValidateException;
@@ -63,14 +64,14 @@
 
 		if (type instanceof ParameterizedType) {
 			Type rawType = ((ParameterizedType) type).getRawType();
-			if (rawType == ResultBean.class) {
-				ResultBean<?> resultBean = new ResultBean(ResultBean.FAIL);
-				resultBean.setMessage(message);
-				return resultBean;
+			if (rawType == AppData.class) {
+				return new AppData(message,AppData.FAIL);
+			} else if (rawType == ResultBean.class) {
+				return new ResultBean(message,ResultBean.FAIL);
 			} else if (rawType == Map.class) {
-				Map<String, Object> result = new HashMap<String, Object>();
-				result.put("msg",message);
-				return result;
+				Map<String, Object> resultMap = new HashMap<String, Object>();
+				resultMap.put("msg", message);
+				return resultMap;
 			}
 		}
 		return null;

--
Gitblit v1.8.0