From e9d304873ef934ab555c932fa82e189493ed2eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Wed, 27 Mar 2024 11:00:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SJZY.Track.Application/EventHandlers/CAPFilter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application/EventHandlers/CAPFilter.cs b/src/SJZY.Track.Application/EventHandlers/CAPFilter.cs index cb60fc54..feaf198f 100644 --- a/src/SJZY.Track.Application/EventHandlers/CAPFilter.cs +++ b/src/SJZY.Track.Application/EventHandlers/CAPFilter.cs @@ -28,8 +28,8 @@ public class CAPFilter : SubscribeFilter using (RedisHelper.Client.Lock("Filter:" + hash, 10)) { var isSkip = !string.IsNullOrEmpty(RedisHelper.Client.Get($"CapExcuteFilter:{hash}")); - // if (isSkip) - // throw new BusinessException(_ERROR_CODE, $"检测到重复消费,消费参数:{argumentJsonStr}"); + if (isSkip) + throw new BusinessException(_ERROR_CODE, $"检测到重复消费,消费参数:{argumentJsonStr}"); RedisHelper.Client.Set($"CapExcuteFilter:{hash}", 60 * 10, TimeSpan.FromHours(1).Seconds); // 1h内不允许一模一样的参数重复消费