Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
3a855389
Commit
3a855389
authored
Aug 08, 2024
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】点击区间时间范围
parent
19d9f89e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
GLNOutController.java
...io/office/modules/manage/controller/GLNOutController.java
+16
-10
No files found.
src/main/java/io/office/modules/manage/controller/GLNOutController.java
View file @
3a855389
...
@@ -74,17 +74,9 @@ public class GLNOutController {
...
@@ -74,17 +74,9 @@ public class GLNOutController {
vo
.
setGtin
(
"0"
+
vo
.
getGtin
());
vo
.
setGtin
(
"0"
+
vo
.
getGtin
());
}
}
//使用redis缓存,做一次接口校验,
if
(!
checkLimit
())
{
String
verified
=
redisUtils
.
get
(
"verified"
);
return
R
.
error
(
"当前查询人数太多,请稍后再试"
);
if
(
StringUtils
.
isNotBlank
(
verified
))
{
return
R
.
error
(
"当前访问人数过多!请换个时间尝试"
);
}
else
{
redisUtils
.
set
(
"verified"
,
"1"
,
1
/
2
);
}
}
SearchgtinlogEntity
searchgtinlogEntity
=
new
SearchgtinlogEntity
();
SearchgtinlogEntity
searchgtinlogEntity
=
new
SearchgtinlogEntity
();
searchgtinlogEntity
.
setCreatedate
(
new
Date
());
searchgtinlogEntity
.
setCreatedate
(
new
Date
());
searchgtinlogEntity
.
setIp
(
IPUtils
.
getIpAddr
(
request
));
searchgtinlogEntity
.
setIp
(
IPUtils
.
getIpAddr
(
request
));
...
@@ -146,6 +138,20 @@ public class GLNOutController {
...
@@ -146,6 +138,20 @@ public class GLNOutController {
return
R
.
ok
().
put
(
"data"
,
objects
);
return
R
.
ok
().
put
(
"data"
,
objects
);
}
}
public
synchronized
boolean
checkLimit
()
{
String
verified
=
redisUtils
.
get
(
"verified"
);
if
(
StringUtils
.
isNotBlank
(
verified
))
{
return
false
;
}
else
{
redisUtils
.
set
(
"verified"
,
"1"
,
1
/
2
);
}
return
true
;
}
//使用redis缓存,做一次接口校验,
/**
/**
* 境外条码查询--验证其他GS1标识
* 境外条码查询--验证其他GS1标识
* 通过其他key查询企业信息
* 通过其他key查询企业信息
...
...
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