From f5c69bae308b0d69a6eee7cb0864fec7285c753c Mon Sep 17 00:00:00 2001 From: 若依 <yzz_ivy@163.com> Date: 星期六, 12 二月 2022 11:53:29 +0800 Subject: [PATCH] !425 优化默认值的问题,Model中不建议有默认值的逻辑 Merge pull request !425 from Yancey/default_value_optimization --- ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) 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 33c9c87..b956b3f 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 @@ -60,14 +60,10 @@ String url = request.getRequestURI(); // 鍞竴鍊硷紙娌℃湁娑堟伅澶村垯浣跨敤璇锋眰鍦板潃锛� - String submitKey = request.getHeader(header); - if (StringUtils.isEmpty(submitKey)) - { - submitKey = url; - } + String submitKey = StringUtils.trimToEmpty(request.getHeader(header)); - // 鍞竴鏍囪瘑锛堟寚瀹歬ey + 娑堟伅澶达級 - String cacheRepeatKey = Constants.REPEAT_SUBMIT_KEY + submitKey; + // 鍞竴鏍囪瘑锛堟寚瀹歬ey + url + 娑堟伅澶达級 + String cacheRepeatKey = Constants.REPEAT_SUBMIT_KEY + url + submitKey; Object sessionObj = redisCache.getCacheObject(cacheRepeatKey); if (sessionObj != null) -- Gitblit v1.9.3