|
|
|
@ -12,7 +12,7 @@ import org.springframework.scripting.support.ResourceScriptSource;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
@ -56,7 +56,7 @@ public class SlideWindowLimitService extends AbstractLimitService {
|
|
|
|
|
String key = LIMIT_TAG + deduplicationSingleKey(service, taskInfo, receiver);
|
|
|
|
|
String scoreValue = String.valueOf(IdUtil.getSnowflake().nextId());
|
|
|
|
|
String score = String.valueOf(nowTime);
|
|
|
|
|
if (redisUtils.execLimitLua(redisScript, Arrays.asList(key), String.valueOf(param.getDeduplicationTime() * 1000), score, String.valueOf(param.getCountNum()), scoreValue)) {
|
|
|
|
|
if (redisUtils.execLimitLua(redisScript, Collections.singletonList(key), String.valueOf(param.getDeduplicationTime() * 1000), score, String.valueOf(param.getCountNum()), scoreValue)) {
|
|
|
|
|
filterReceiver.add(receiver);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|