防抖返回 请求频繁,请重试
This commit is contained in:
parent
279eba7e42
commit
e9de2c11a9
|
|
@ -1,6 +1,7 @@
|
|||
package com.sqx.common.aspect;
|
||||
|
||||
import com.sqx.common.annotation.Debounce;
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.common.utils.SpelUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
|
|
@ -76,7 +77,7 @@ public class DebounceAspect {
|
|||
return joinPoint.proceed();
|
||||
}
|
||||
// 在防抖间隔内,不执行目标方法,直接返回
|
||||
return null;
|
||||
return Result.error("请求频繁,请重试");
|
||||
}
|
||||
|
||||
private Object debounceForSpecificValue(ProceedingJoinPoint joinPoint, String methodSignature, long interval, TimeUnit timeUnit, Object targetValue) throws Throwable {
|
||||
|
|
@ -89,7 +90,7 @@ public class DebounceAspect {
|
|||
return joinPoint.proceed();
|
||||
}
|
||||
// 在防抖间隔内,不执行目标方法,直接返回
|
||||
return null;
|
||||
return Result.error("请求频繁,请重试");
|
||||
}
|
||||
|
||||
public void cleanExpiredRecords() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue