Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
f65cd624
Commit
f65cd624
authored
Dec 30, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防重复提交标识组合(key + url + header)
parent
530b2a51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java
...yi/framework/interceptor/impl/SameUrlDataInterceptor.java
+3
-7
No files found.
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java
View file @
f65cd624
...
@@ -60,14 +60,10 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor
...
@@ -60,14 +60,10 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor
String
url
=
request
.
getRequestURI
();
String
url
=
request
.
getRequestURI
();
// 唯一值(没有消息头则使用请求地址)
// 唯一值(没有消息头则使用请求地址)
String
submitKey
=
request
.
getHeader
(
header
);
String
submitKey
=
StringUtils
.
trimToEmpty
(
request
.
getHeader
(
header
));
if
(
StringUtils
.
isEmpty
(
submitKey
))
{
submitKey
=
url
;
}
// 唯一标识(指定key + 消息头)
// 唯一标识(指定key +
url +
消息头)
String
cacheRepeatKey
=
Constants
.
REPEAT_SUBMIT_KEY
+
submitKey
;
String
cacheRepeatKey
=
Constants
.
REPEAT_SUBMIT_KEY
+
url
+
submitKey
;
Object
sessionObj
=
redisCache
.
getCacheObject
(
cacheRepeatKey
);
Object
sessionObj
=
redisCache
.
getCacheObject
(
cacheRepeatKey
);
if
(
sessionObj
!=
null
)
if
(
sessionObj
!=
null
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment