From ad4df6245dcb2628cdb33ac1333af4af317479b5 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 11 Aug 2020 11:24:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=98=B2=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=8B=A6=E6=88=AA=E5=99=A8=EF=BC=8C=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E6=B2=A1=E6=9C=89=E6=B6=88=E6=81=AF=E5=A4=B4=E5=88=99?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interceptor/impl/SameUrlDataInterceptor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java index cd84c54d..e3864c7a 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java @@ -70,8 +70,15 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor // 请求地址(作为存放cache的key值) String url = request.getRequestURI(); + // 唯一值(没有消息头则使用请求地址) + String submitKey = request.getHeader(header); + if (StringUtils.isEmpty(submitKey)) + { + submitKey = url; + } + // 唯一标识(指定key + 消息头) - String cache_repeat_key = Constants.REPEAT_SUBMIT_KEY + request.getHeader(header); + String cache_repeat_key = Constants.REPEAT_SUBMIT_KEY + submitKey; Object sessionObj = redisCache.getCacheObject(cache_repeat_key); if (sessionObj != null)