防抖返回 请求频繁,请重试

This commit is contained in:
wangw 2025-01-14 13:33:47 +08:00
parent 279eba7e42
commit e9de2c11a9
1 changed files with 3 additions and 2 deletions

View File

@ -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() {