|
|
@ -43,10 +43,20 @@ public class VisitorProcessor extends AbstractProcessor {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Object doProcess(TrackContext context) {
|
|
|
|
|
|
|
|
if (context.isError()) {
|
|
|
|
|
|
|
|
log.debug("=== AOP 异常通知 ===");
|
|
|
|
|
|
|
|
return afterThrowingProcess(context);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
log.debug("=== AOP 后置通知 ===");
|
|
|
|
|
|
|
|
return afterReturnProcess(context);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 后置通知
|
|
|
|
* 后置通知
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Object afterReturnProcess(TrackContext context) {
|
|
|
|
public Object afterReturnProcess(TrackContext context) {
|
|
|
|
Map<String, Object> params = context.getParams();
|
|
|
|
Map<String, Object> params = context.getParams();
|
|
|
|
Long taskId = (Long) params.get("taskId");
|
|
|
|
Long taskId = (Long) params.get("taskId");
|
|
|
@ -60,7 +70,6 @@ public class VisitorProcessor extends AbstractProcessor {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 异常通知
|
|
|
|
* 异常通知
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Object afterThrowingProcess(TrackContext context) {
|
|
|
|
public Object afterThrowingProcess(TrackContext context) {
|
|
|
|
log.error(context.getExMessageResult());
|
|
|
|
log.error(context.getExMessageResult());
|
|
|
|
Map<String, Object> params = context.getParams();
|
|
|
|
Map<String, Object> params = context.getParams();
|
|
|
|