From 76bf98720341c874627e69f65c871a77b6781e9a Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 22 九月 2021 10:09:15 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev --- ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java | 1 - ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java | 9 +++++++-- ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java | 6 +++++- ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelHandlerAdapter.java | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java index c2bbee4..512f4bf 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java @@ -20,10 +20,15 @@ public @interface RepeatSubmit { /** - * 榛樿浣跨敤鍏ㄥ眬閰嶇疆 + * 闂撮殧鏃堕棿(ms)锛屽皬浜庢鏃堕棿瑙嗕负閲嶅鎻愪氦 */ - int intervalTime() default 0; + int interval() default 5000; TimeUnit timeUnit() default TimeUnit.MILLISECONDS; + /** + * 鎻愮ず娑堟伅 + */ + String message() default "涓嶅厑璁搁噸澶嶆彁浜わ紝璇风◢鍚庡啀璇�"; + } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelHandlerAdapter.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelHandlerAdapter.java new file mode 100644 index 0000000..c9ca2d5 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelHandlerAdapter.java @@ -0,0 +1,19 @@ +package com.ruoyi.common.utils.poi; + +/** + * Excel鏁版嵁鏍煎紡澶勭悊閫傞厤鍣� + * + * @author ruoyi + */ +public interface ExcelHandlerAdapter +{ + /** + * 鏍煎紡鍖� + * + * @param value 鍗曞厓鏍兼暟鎹�� + * @param args excel娉ㄨВargs鍙傛暟缁� + * + * @return 澶勭悊鍚庣殑鍊� + */ + Object format(Object value, String[] args); +} diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java index f18d79b..642076d 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java @@ -146,7 +146,11 @@ if (paramsArray != null && paramsArray.length > 0) { for (Object o : paramsArray) { if (StringUtils.isNotNull(o) && !isFilterObject(o)) { - params.append(JsonUtils.toJsonString(o)).append(" "); + try { + params.append(JsonUtils.toJsonString(o)).append(" "); + } catch (Exception e) { + e.printStackTrace(); + } } } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java index 3154fa2..dc140e2 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java @@ -62,5 +62,4 @@ stringBuffer.append(targetClass.getName()).append("-").append(method.getName()); return stringBuffer.toString(); } - } -- Gitblit v1.9.3