Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
V
volunteer_service
Project
Project
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
licc
volunteer_service
Commits
27ba6638
Commit
27ba6638
authored
Apr 11, 2021
by
xc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shiro限定并发登录人数
parent
38e338fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
KickoutSessionControlFilter.java
...ergy/service/shir/filter/KickoutSessionControlFilter.java
+6
-4
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/shir/filter/KickoutSessionControlFilter.java
View file @
27ba6638
...
@@ -71,20 +71,22 @@ public class KickoutSessionControlFilter extends AccessControlFilter{
...
@@ -71,20 +71,22 @@ public class KickoutSessionControlFilter extends AccessControlFilter{
HttpServletRequest
httpServletRequest
=(
HttpServletRequest
)
request
;
HttpServletRequest
httpServletRequest
=(
HttpServletRequest
)
request
;
HttpServletResponse
httpServletResponse
=
(
HttpServletResponse
)
response
;
HttpServletResponse
httpServletResponse
=
(
HttpServletResponse
)
response
;
// 登录超时
// 登录超时
Object
object
=
SecurityUtils
.
getSubject
().
getPrincipal
();
Integer
userId
=
null
;
Integer
userId
=
null
;
try
{
try
{
//客户端
//客户端
User
user
=
(
User
)
object
;
User
user
=
(
User
)
SecurityUtils
.
getSubject
().
getPrincipal
();
log
.
info
(
"KickoutSessionControlFilter user : {}......."
,
user
.
toString
());
userId
=
user
.
getId
();
userId
=
user
.
getId
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
try
{
try
{
//管理端
//管理端
AccountInfo
accountInfo
=
(
AccountInfo
)
object
;
AccountInfo
accountInfo
=
(
AccountInfo
)
SecurityUtils
.
getSubject
().
getPrincipal
();
log
.
info
(
"KickoutSessionControlFilter accountInfo : {}......."
,
accountInfo
.
toString
());
userId
=
accountInfo
.
getId
();
userId
=
accountInfo
.
getId
();
}
catch
(
Exception
en
)
{
}
catch
(
Exception
en
)
{
//员工端
//员工端
Staff
staff
=
(
Staff
)
object
;
Staff
staff
=
(
Staff
)
SecurityUtils
.
getSubject
().
getPrincipal
();
log
.
info
(
"KickoutSessionControlFilter staff : {}......."
,
staff
.
toString
());
userId
=
staff
.
getId
();
userId
=
staff
.
getId
();
}
}
}
}
...
...
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