From c4e17ff8472fd9f8123e86b593b2968ad5936b15 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期一, 01 十一月 2021 13:49:11 +0800
Subject: [PATCH] fix 修复 xxl-job-admin 部署问题

---
 ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java
index 3814a2c..41116d8 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RepeatSubmitAspect.java
@@ -39,11 +39,11 @@
     @Before("@annotation(repeatSubmit)")
     public void doBefore(JoinPoint point, RepeatSubmit repeatSubmit) throws Throwable {
         // 濡傛灉娉ㄨВ涓嶄负0 鍒欎娇鐢ㄦ敞瑙f暟鍊�
-        long intervalTime = repeatSubmitProperties.getIntervalTime();
-        if (repeatSubmit.intervalTime() > 0) {
-            intervalTime = repeatSubmit.timeUnit().toMillis(repeatSubmit.intervalTime());
+        long interval = repeatSubmitProperties.getInterval();
+        if (repeatSubmit.interval() > 0) {
+            interval = repeatSubmit.timeUnit().toMillis(repeatSubmit.interval());
         }
-        if (intervalTime < 1000) {
+        if (interval < 1000) {
             throw new ServiceException("閲嶅鎻愪氦闂撮殧鏃堕棿涓嶈兘灏忎簬'1'绉�");
         }
         HttpServletRequest request = ServletUtils.getRequest();
@@ -60,9 +60,9 @@
         submitKey = SecureUtil.md5(submitKey + ":" + nowParams);
         // 鍞竴鏍囪瘑锛堟寚瀹歬ey + 娑堟伅澶达級
         String cacheRepeatKey = Constants.REPEAT_SUBMIT_KEY + submitKey;
-        LockInfo lock = lockTemplate.lock(cacheRepeatKey, intervalTime, intervalTime / 2);
+        LockInfo lock = lockTemplate.lock(cacheRepeatKey, interval, interval / 2);
         if (lock == null) {
-            throw new ServiceException("涓嶅厑璁搁噸澶嶆彁浜わ紝璇风◢鍚庡啀璇�!");
+            throw new ServiceException(repeatSubmit.message());
         }
     }
 

--
Gitblit v1.9.3