Skip to content
Snippets Groups Projects

3

Merged jiangxiaoming requested to merge jiangxiaoming into dev
Compare and
1 file
+ 15
0
Compare changes
  • Side-by-side
  • Inline
@@ -57,6 +57,21 @@ public class LogAspect{
@Pointcut("@annotation(com.seasky.ledgerincome.annotation.LogOperation)")
public void logPointcut() {}
@AfterThrowing(pointcut = "logPointcut()",throwing = "ex")
public void afterThrowing(JoinPoint joinPoint, Throwable ex){
String methodName = joinPoint.getSignature().getName();
Object[] args = joinPoint.getArgs();
if(methodName.equals("queryInvoice")){
UserInfoOut infoOut = userInfoUtil.getLoginInfoOut();
String userName = infoOut.getUserName();
Long incomeId = ((SendInvoiceCmd) args[0]).getIncomeId();
String desc = "查询接口反馈信息:"+ex.getMessage();
String personName = infoOut.getPersonName();
LogPo log = new LogPo(incomeId,"开票结果查询",personName,userName,desc,new Date());
logMapper.insert(log);
}
}
@Around("execution(* com.seasky.ledgerincome.interfaces.controller.*.*(..))")
public Object doAroundAdvice(ProceedingJoinPoint point) throws Throwable {
String userName = "";