Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tax-sys-nacos
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
caoxiaohong
tax-sys-nacos
Commits
267c694d
Commit
267c694d
authored
Apr 29, 2024
by
ddx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉20分钟请求60次逻辑
parent
91f0e374
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
tax-common/src/main/java/com/yxcheng/token/common/aop/LogAop.java
+1
-1
tax-token/token-web/src/main/java/com/tax/token/web/controller/TokenController.java
+7
-7
tax-token/token-web/src/test/java/com/yxcheng/token/web/controller/test/TokenUnitTest.java
+2
-2
No files found.
tax-common/src/main/java/com/yxcheng/token/common/aop/LogAop.java
View file @
267c694d
...
...
@@ -66,7 +66,7 @@ public class LogAop {
if
(
logt
.
value
().
equals
(
LogT
.
LOG_VIEW_PART
))
{
logResult
=
sublog
(
logResult
);
}
log
.
info
(
start
+
" method:"
+
point
.
toShortString
()
+
";response:"
+
logResult
+
" is end! cost:["
+
time
+
"ms]"
);
log
.
info
(
start
+
" method:"
+
point
.
toShortString
()
+
";params:"
+
JSONObject
.
toJSONString
(
paramsMap
)
+
";response:"
+
logResult
+
" is end! cost:["
+
time
+
"ms]"
);
return
result
;
...
...
tax-token/token-web/src/main/java/com/tax/token/web/controller/TokenController.java
View file @
267c694d
...
...
@@ -65,14 +65,14 @@ public class TokenController extends BaseClientController {
if
(
cookieReq
.
checkParamNull
()
||
!
ZoneUtil
.
dqList
.
contains
(
cookieReq
.
getZoneCode
()))
{
return
JsonResult
.
errorResult
(
ResultEnum
.
param_error
.
getCode
(),
ResultEnum
.
param_error
.
getMessage
());
}
if
(
tokenService
.
checkTokenRealRequestCount
(
cookieReq
.
getAccessKeyID
(),
cookieReq
.
getTaxno
()))
{
int
realRequestCount
=
tokenService
.
getTokenRealRequestCount
(
cookieReq
.
getAccessKeyID
(),
cookieReq
.
getTaxno
());
if
(
realRequestCount
>
60
)
{
return
JsonResult
.
errorResult
(
ResultEnum
.
system_error
.
getCode
(),
"请求太频繁,请20分钟后重试!"
);
}
}
//
if (tokenService.checkTokenRealRequestCount(cookieReq.getAccessKeyID(), cookieReq.getTaxno())) {
//
int realRequestCount = tokenService.getTokenRealRequestCount(cookieReq.getAccessKeyID(), cookieReq.getTaxno());
//
if(realRequestCount>60) {
//
return JsonResult.errorResult(ResultEnum.system_error.getCode(), "请求太频繁,请20分钟后重试!");
//
}
//
}
String
uuId
=
UUIDGenerator
.
generate
();
tokenService
.
setTokenRealRequestCount
(
cookieReq
.
getAccessKeyID
(),
cookieReq
.
getTaxno
());
//
tokenService.setTokenRealRequestCount(cookieReq.getAccessKeyID(), cookieReq.getTaxno());
return
tokenService
.
getRealCookie
(
uuId
,
cookieReq
.
getTaxno
(),
cookieReq
.
getZoneCode
(),
cookieReq
.
getAccessKeyID
(),
true
,
TokenConstants
.
FUNCTION_NO_FPY
,
cookieReq
.
getUserInfoJson
(),
cookieReq
.
getCheckType
(),
cookieReq
.
getSite
(),
cookieReq
.
getTarget
());
}
...
...
tax-token/token-web/src/test/java/com/yxcheng/token/web/controller/test/TokenUnitTest.java
View file @
267c694d
...
...
@@ -109,8 +109,8 @@ public class TokenUnitTest {
param
.
put
(
"taxno"
,
"91510100MA6A5JGH7B"
);
param
.
put
(
"zoneCode"
,
"5100"
);
System
.
out
.
println
(
url
);
String
ret
=
HttpHelper
.
postWithJson
(
url
,
JSON
.
toJSONString
(
param
));
System
.
out
.
println
(
ret
);
ResponseContent
ret
=
HttpHelper
.
postJsonEntity
(
url
,
JSON
.
toJSONString
(
param
));
System
.
out
.
println
(
ret
.
getContent
()
);
}
@Test
...
...
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