文件名从 se-system/src/main/java/com/terra/system/aspect/LogAspect.java 修改 |
| | |
| | | package com.terra.system.aspect; |
| | | package com.terra.common.aspect; |
| | | |
| | | import com.terra.system.annotation.SysLog; |
| | | import com.terra.system.entity.sys.OperateEntity; |
| | | import com.terra.system.entity.sys.UserEntity; |
| | | import com.terra.system.helper.WebHelper; |
| | | import com.terra.system.service.sys.OperateService; |
| | | import com.terra.system.service.sys.TokenService; |
| | | import com.terra.common.annotation.SysLog; |
| | | import com.terra.common.helper.WebHelper; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Pointcut; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | @Aspect |
| | | @Component |
| | | public class LogAspect { |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @Resource |
| | | private OperateService operateService; |
| | | |
| | | private final static String SELECT = "select"; |
| | | |
| | | private final static String INSERT = "insert"; |
| | |
| | | HttpServletRequest req = WebHelper.getRequest(); |
| | | String url = req.getServletPath(); |
| | | |
| | | OperateEntity oe = new OperateEntity(); |
| | | /*OperateEntity oe = new OperateEntity(); |
| | | oe.setIp(WebHelper.getIpAddress(req)); |
| | | oe.setUrl(url); |
| | | oe.setExec(time); |
| | |
| | | oe.setUserid(ue.getId()); |
| | | } |
| | | |
| | | operateService.insertOperate(oe); |
| | | operateService.insertOperate(oe);*/ |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |