Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
isc-core
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
isc-v3.1-tmp
isc-core
Commits
45d6c1e5
Commit
45d6c1e5
authored
Sep 28, 2024
by
hulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: tdh查询
parent
12c5c849
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
17 deletions
+32
-17
tdhmapper.xml
isc-common-core/src/main/resources/mapper/tdhmapper.xml
+1
-1
ISCAuthInterceptor.java
.../com/brilliance/isc/common/filter/ISCAuthInterceptor.java
+31
-16
No files found.
isc-common-core/src/main/resources/mapper/tdhmapper.xml
View file @
45d6c1e5
...
...
@@ -140,7 +140,7 @@
</select>
<select
id=
"listTdh"
resultMap=
"VoResultMap"
>
select
distinct
a.INR INR, a.CUR CUR,concat (a.cur,' - ',b.TXT) curname, a.DATESOURCE DATESOURCE, a.DAT DAT, a.DATEDAY DATEDAY,
select a.INR INR, a.CUR CUR,concat (a.cur,' - ',b.TXT) curname, a.DATESOURCE DATESOURCE, a.DAT DAT, a.DATEDAY DATEDAY,
date_format(a.DAT, '%Y-%m-%d') DAT_STR from TDH a left join stb b on b.TBL = 'CURTXT' and a.CUR = b.COD and b.UIL = 'EN'
<where>
<choose>
...
...
isc-common-service/src/main/java/com/brilliance/isc/common/filter/ISCAuthInterceptor.java
View file @
45d6c1e5
...
...
@@ -8,6 +8,8 @@ import com.brilliance.isc.common.login.res.LoginCacheVo;
import
com.brilliance.isc.common.login.vo.LoginInfoVO
;
import
com.brilliance.isc.exception.RestBizException
;
import
com.brilliance.isc.vo.manager.SessionUserVo
;
import
jdk.nashorn.internal.ir.annotations.Ignore
;
import
org.apache.commons.compress.utils.Sets
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.data.redis.core.RedisTemplate
;
...
...
@@ -18,6 +20,8 @@ import javax.annotation.Resource;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.HashSet
;
import
java.util.Set
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -45,22 +49,13 @@ public class ISCAuthInterceptor implements HandlerInterceptor{
@Resource
protected
BizLocker
bizLocker
;
private
void
clearUserLock
(
String
requestURI
,
SessionUserVo
sessionUserVo
){
if
(
requestURI
.
indexOf
(
"/logout"
)
>
-
1
){
logger
.
info
(
"退出释放等钱用户锁"
);
bizLocker
.
unlockAllOfUser
(
sessionUserVo
.
getLogName
());
logger
.
info
(
"Filter中锁释放完毕"
);
}
}
private
Set
<
String
>
ignoreURI
=
Sets
.
newHashSet
(
"login/verify"
,
"login/changeRole"
,
"login/changeOrg"
);
/**
* 避免因为异常导致ThreadLocal未被清理
*/
private
void
clearCache
(){
SettleContext
.
removeUserSession
();
SettleContext
.
removeSessionUserVo
();
BchServiceImpl
.
removeBranchCacheMap
();
BchServiceImpl
.
removeBchInrCacheMap
();
public
Set
<
String
>
getIgnoreURI
()
{
return
ignoreURI
;
}
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
IOException
{
...
...
@@ -68,7 +63,7 @@ public class ISCAuthInterceptor implements HandlerInterceptor{
String
requestURI
=
request
.
getRequestURI
();
logger
.
info
(
"本次请求的url["
+
requestURI
+
"]"
);
if
(
requestURI
.
contains
(
"login/verify"
)
||
requestURI
.
contains
(
"login/changeRole"
)
||
requestURI
.
contains
(
"login/changeOrg"
)){
if
(
ignoreURI
.
stream
().
filter
(
requestURI:
:
startsWith
).
findFirst
().
isPresent
(
)){
return
true
;
}
//
...
...
@@ -103,6 +98,26 @@ public class ISCAuthInterceptor implements HandlerInterceptor{
return
true
;
}
private
void
clearUserLock
(
String
requestURI
,
SessionUserVo
sessionUserVo
){
if
(
requestURI
.
indexOf
(
"/logout"
)
>
-
1
){
logger
.
info
(
"退出释放等钱用户锁"
);
bizLocker
.
unlockAllOfUser
(
sessionUserVo
.
getLogName
());
logger
.
info
(
"Filter中锁释放完毕"
);
}
}
/**
* 避免因为异常导致ThreadLocal未被清理
*/
private
void
clearCache
(){
SettleContext
.
removeUserSession
();
SettleContext
.
removeSessionUserVo
();
BchServiceImpl
.
removeBranchCacheMap
();
BchServiceImpl
.
removeBchInrCacheMap
();
}
public
void
postHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
ModelAndView
modelAndView
)
{
System
.
out
.
println
(
"postHandle: "
+
request
.
getRequestURI
());
}
...
...
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