| | |
| | | package com.whyc.aop; |
| | | |
| | | import com.whyc.pojo.Menu; |
| | | import com.whyc.service.OperationLogService; |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.annotation.AfterReturning; |
| | |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | |
| | | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | for (int i = 0; i < parameterNames.length; i++) { |
| | | map.put(parameterNames[i],args[i]); |
| | | map.put(parameterNames[i],args[i].toString()); |
| | | } |
| | | |
| | | //拼接成操作日志内容 |
| | | String content = "执行了"+className+"的"+methodType+"操作," + |
| | | "具体调用方法为:"+methodName+","+ |
| | | "参数信息为:"+map; |
| | | operationLogService.record(methodType,content,userName,currentUserTerminalIp); |
| | | "具体调用方法为:"+methodName; |
| | | |
| | | operationLogService.record(methodType,content,map.toString(),userName,currentUserTerminalIp); |
| | | |
| | | } |
| | | |