use of com.zyd.blog.business.enums.PlatformEnum in project OneBlog by zhangyd-c.
the class BussinessLogAspect method handle.
private void handle(ProceedingJoinPoint point) throws Exception {
Method currentMethod = AspectUtil.INSTANCE.getMethod(point);
// 获取操作名称
BussinessLog annotation = currentMethod.getAnnotation(BussinessLog.class);
boolean save = annotation.save();
PlatformEnum platform = annotation.platform();
String bussinessName = AspectUtil.INSTANCE.parseParams(point.getArgs(), annotation.value());
String ua = RequestUtil.getUa();
log.info("{} | {} - {} {} - {}", bussinessName, RequestUtil.getIp(), RequestUtil.getMethod(), RequestUtil.getRequestUrl(), ua);
if (!save) {
return;
}
logService.asyncSaveSystemLog(platform, bussinessName);
}
Aggregations