|
|
@ -35,9 +35,8 @@ public class NoRepeatSubmitAop { |
|
|
|
private DistributedLock distributedLock; |
|
|
|
|
|
|
|
@Around("@annotation(noRepeatSubmit)") |
|
|
|
public Object around(ProceedingJoinPoint pjp, NoRepeatSubmit noRepeatSubmit) { |
|
|
|
public Object around(ProceedingJoinPoint pjp, NoRepeatSubmit noRepeatSubmit) throws Throwable { |
|
|
|
|
|
|
|
try { |
|
|
|
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
|
|
|
assert attributes != null; |
|
|
|
HttpServletRequest request = attributes.getRequest(); |
|
|
@ -64,12 +63,7 @@ public class NoRepeatSubmitAop { |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
} catch (RenException e) { |
|
|
|
throw e; |
|
|
|
} catch (Throwable e) { |
|
|
|
log.error("验证重复提交时出现未知异常!"); |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private String getKey(String keyExpress, String token) { |
|
|
|