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
45e3bca3
Commit
45e3bca3
authored
Dec 13, 2023
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】请求gds接口限制
parent
264befaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
TycpdmFirmServiceImpl.java
...ce/modules/manage/service/impl/TycpdmFirmServiceImpl.java
+5
-5
No files found.
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmServiceImpl.java
View file @
45e3bca3
...
...
@@ -723,6 +723,11 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
url
=
"http://wsdt.gs1cn.org/anccoh/login?method=phoneSSO&phone="
+
phone_M
;
log
.
info
(
url
);
}
String
value
=
redisUtils
.
get
(
"gds:"
+
phone
);
if
(
StringUtils
.
isNotBlank
(
value
))
{
throw
new
RRException
(
"请求频繁,请3s后重试!"
);
}
redisUtils
.
set
(
"gds:"
+
phone
,
"Y"
,
3
);
token
=
HttpUtil
.
get
(
url
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
token
);
log
.
info
(
jsonObject
.
toString
());
...
...
@@ -731,12 +736,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
if
(!
"200"
.
equals
(
status
))
{
throw
new
RRException
(
"获取token失败"
+
msg
);
}
String
value
=
redisUtils
.
get
(
"gds:"
+
phone
);
if
(
StringUtils
.
isNotBlank
(
value
))
{
throw
new
RRException
(
"请求频繁,请3s后重试!"
);
}
redisUtils
.
set
(
"gds:"
+
phone
,
"Y"
,
3
);
log
.
info
(
"http://wsdt.gs1cn.org/anccoh/login?method=redirect&token="
+
msg
);
return
"http://wsdt.gs1cn.org/anccoh/login?method=redirect&token="
+
msg
;
}
...
...
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