From 18c1ac5a5b054094ebfd58a66c80284ac7ecb267 Mon Sep 17 00:00:00 2001 From: Zhou Mingfa Date: Thu, 22 Feb 2024 15:54:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=8F=90=E4=BA=A4=E6=B3=A8=E8=A7=A3=20?= =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/support/repeatsubmit/RepeatSubmitAspect.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/module/support/repeatsubmit/RepeatSubmitAspect.java b/smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/module/support/repeatsubmit/RepeatSubmitAspect.java index af403c64..55ac6f2c 100644 --- a/smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/module/support/repeatsubmit/RepeatSubmitAspect.java +++ b/smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/module/support/repeatsubmit/RepeatSubmitAspect.java @@ -61,12 +61,14 @@ public class RepeatSubmitAspect { RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class); // 说明注解去掉了 - if (annotation != null) { + if (annotation == null) { return point.proceed(); } int interval = Math.min(annotation.value(), RepeatSubmit.MAX_INTERVAL); if (System.currentTimeMillis() < timeStamp + interval) { + // 续上时间 能在间隔时间内反复提示用户提交频繁 + this.repeatSubmitTicket.putTicket(ticket); // 提交频繁 return ResponseDTO.error(UserErrorCode.REPEAT_SUBMIT); } @@ -80,8 +82,6 @@ public class RepeatSubmitAspect { } catch (Throwable throwable) { log.error("", throwable); throw throwable; - } finally { - this.repeatSubmitTicket.removeTicket(ticket); } return obj; }