You've already forked FrameTour-BE
统计不统计
This commit is contained in:
@ -27,10 +27,10 @@ public class StatsInterceptor implements HandlerInterceptor {
|
||||
if (!(handler instanceof HandlerMethod)) {
|
||||
return true;
|
||||
}
|
||||
HandlerMethod handlerMethod = (HandlerMethod) handler;
|
||||
request.setAttribute("startTime", System.currentTimeMillis());
|
||||
String requestURI = request.getRequestURI();
|
||||
String method = request.getMethod();
|
||||
// HandlerMethod handlerMethod = (HandlerMethod) handler;
|
||||
// request.setAttribute("startTime", System.currentTimeMillis());
|
||||
// String requestURI = request.getRequestURI();
|
||||
// String method = request.getMethod();
|
||||
String traceId = request.getHeader("traceId");
|
||||
if (StringUtils.isEmpty(traceId)) {
|
||||
return true;
|
||||
@ -38,9 +38,9 @@ public class StatsInterceptor implements HandlerInterceptor {
|
||||
// response.setHeader("Set-TraceId", traceId);
|
||||
// statsService.addStats(traceId, null);
|
||||
}
|
||||
if (handlerMethod.getMethodAnnotation(IgnoreLogReq.class) == null) {
|
||||
statsService.addRecord(traceId, "REQUEST",method + " " + requestURI, null);
|
||||
}
|
||||
// if (handlerMethod.getMethodAnnotation(IgnoreLogReq.class) == null) {
|
||||
// statsService.addRecord(traceId, "REQUEST",method + " " + requestURI, null);
|
||||
// }
|
||||
if (StringUtils.isNotEmpty(BaseContextHandler.getUserId())) {
|
||||
statsService.updateStats(traceId, Long.valueOf(BaseContextHandler.getUserId()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user