From 9639c096baaac61e28b23b43e6df0e3993a218ab Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期五, 27 五月 2022 17:50:49 +0800
Subject: [PATCH] 用户列表查询不显示密码字段
---
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java | 14 +++++---------
1 files changed, 5 insertions(+), 9 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..0c5a40d 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
@@ -7,7 +7,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.redis.RedisCache;
@@ -50,7 +50,7 @@
// body参数为空,获取Parameter的数据
if (StringUtils.isEmpty(nowParams))
{
- nowParams = JSONObject.toJSONString(request.getParameterMap());
+ nowParams = JSON.toJSONString(request.getParameterMap());
}
Map<String, Object> nowDataMap = new HashMap<String, Object>();
nowDataMap.put(REPEAT_PARAMS, nowParams);
@@ -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));
- // 唯一标识(指定key + 消息头)
- String cacheRepeatKey = Constants.REPEAT_SUBMIT_KEY + submitKey;
+ // 唯一标识(指定key + url + 消息头)
+ String cacheRepeatKey = Constants.REPEAT_SUBMIT_KEY + url + submitKey;
Object sessionObj = redisCache.getCacheObject(cacheRepeatKey);
if (sessionObj != null)
--
Gitblit v1.9.2