lyhzzz 3 nedēļas atpakaļ
vecāks
revīzija
486210b778

+ 11 - 5
src/main/java/com/fdkankan/fusion/aop/PushJmAspect.java

@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.fusion.common.ResultData;
 import com.fdkankan.fusion.config.FusionConfig;
 import com.fdkankan.fusion.down.CaseDownService;
+import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.httpClient.client.OtherClient;
 import com.fdkankan.fusion.mq.vo.JmGaEventVo;
 import com.fdkankan.rabbitmq.util.RabbitMqProducer;
@@ -52,13 +53,14 @@ public class PushJmAspect {
 	}
 	@Around("servicePush()")
 	public Object servicePush(ProceedingJoinPoint joinPoint)  {
+		Object result = null;
 		try {
 			HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
 			//获取参数
 			JSONObject params = this.getParams(joinPoint, request);
 			log.info("请求参数:{}",params);
 			//放行
-			Object result = joinPoint.proceed();
+			result = joinPoint.proceed();
 			ResultData resultData = (ResultData) result;
 			if(resultData.getCode() != 0){
 				return result;
@@ -95,12 +97,16 @@ public class PushJmAspect {
 			}
 
 			return result;
-		}catch (Exception e){
-			log.info("servicePush--error:{}",e);
+		}catch (BusinessException exception){
+			log.info("servicePush-BusinessException-error:{}",exception);
+			return exception;
+		} catch (Exception e){
+			log.info("servicePush-Exception-error:{}",e);
+			return e;
 		}catch (Throwable throwable){
-			log.info("servicePush--error:{}",throwable);
+			log.info("servicePush-Throwable-error:{}",throwable);
+			return throwable;
 		}
-		return null;
 	}