| | |
| | | // 获取用户信息 |
| | | BaUser user = (BaUser)getCurUser(result); |
| | | if(user!=null && user.id !=null && !StringUtils.isNullOrEmpty(user.name)){ |
| | | Long operator = user.id; |
| | | // 获取方法的中文描述 |
| | | MethodSignature sign = (MethodSignature) joinPoint.getSignature(); |
| | | Log logDesc = sign.getMethod().getAnnotation(Log.class); |
| | |
| | | // 获取IP地址 |
| | | String ip = getRemoteHost(); |
| | | // 记录日志 |
| | | logSv.save(operator, operationName,ip,result.getCode(),result.getMsg()); |
| | | logSv.save(user.id,user.name, operationName,ip,result.getCode(),result.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("记录日志异常:"+e.getMessage()); |