| | |
| | | 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;
|
| | |
| | |
|
| | | 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;
|