!541 api记录日志耗时单位修改为毫秒

This commit is contained in:
YunaiV 2023-07-25 19:59:25 +08:00
parent bd7fee0a88
commit 52fc41cfa5

View File

@ -105,7 +105,7 @@ public class ApiAccessLogFilter extends ApiRequestFilter {
// 持续时间 // 持续时间
accessLog.setBeginTime(beginTime); accessLog.setBeginTime(beginTime);
accessLog.setEndTime(LocalDateTime.now()); accessLog.setEndTime(LocalDateTime.now());
accessLog.setDuration((int) LocalDateTimeUtil.between(accessLog.getBeginTime(), accessLog.getEndTime(), ChronoUnit.SECONDS)); accessLog.setDuration((int) LocalDateTimeUtil.between(accessLog.getBeginTime(), accessLog.getEndTime(), ChronoUnit.MILLIS));
} }
} }