Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5portal
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
管理员
jfV5portal
Commits
9fe36619
Commit
9fe36619
authored
Aug 06, 2018
by
周添尉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
casAction
parent
bafcb65c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
CasAction.java
src_system/com/gaowj/system/login/CasAction.java
+10
-1
No files found.
src_system/com/gaowj/system/login/CasAction.java
View file @
9fe36619
package
com
.
gaowj
.
system
.
login
;
package
com
.
gaowj
.
system
.
login
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
org.jasig.cas.client.authentication.AttributePrincipal
;
import
org.jasig.cas.client.authentication.AttributePrincipal
;
...
@@ -36,7 +38,10 @@ public class CasAction extends BasicAction {
...
@@ -36,7 +38,10 @@ public class CasAction extends BasicAction {
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
query
.
put
(
"EMID"
,
username
);
query
.
put
(
"EMID"
,
username
);
Map
<
String
,
Object
>
userInfoI
=
systemOpeBusiness
.
listLoginUserInfo
(
query
).
get
(
0
);
Map
<
String
,
Object
>
userInfoI
=
null
;
List
<
Map
<
String
,
Object
>>
listUser
=
systemOpeBusiness
.
listLoginUserInfo
(
query
);
if
(
listUser
.
size
()>
0
){
userInfoI
=
systemOpeBusiness
.
listLoginUserInfo
(
query
).
get
(
0
);
Map
<
String
,
Object
>
sessionUser
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
sessionUser
=
new
HashMap
<
String
,
Object
>();
String
u_all_m
=
systemOpeBusiness
.
getUserAllModule
(
userInfoI
.
get
(
"CODE"
).
toString
());
String
u_all_m
=
systemOpeBusiness
.
getUserAllModule
(
userInfoI
.
get
(
"CODE"
).
toString
());
sessionUser
.
put
(
"CODE"
,
userInfoI
.
get
(
"CODE"
));
sessionUser
.
put
(
"CODE"
,
userInfoI
.
get
(
"CODE"
));
...
@@ -46,12 +51,14 @@ public class CasAction extends BasicAction {
...
@@ -46,12 +51,14 @@ public class CasAction extends BasicAction {
sessionUser
.
put
(
"EMDEPART"
,
userInfoI
.
get
(
"EMDEPART"
));
sessionUser
.
put
(
"EMDEPART"
,
userInfoI
.
get
(
"EMDEPART"
));
sessionUser
.
put
(
"EMNAME"
,
userInfoI
.
get
(
"EMNAME"
));
sessionUser
.
put
(
"EMNAME"
,
userInfoI
.
get
(
"EMNAME"
));
sessionUser
.
put
(
"BEFORETIME"
,
userInfoI
.
get
(
"BEFORETIME"
));
sessionUser
.
put
(
"BEFORETIME"
,
userInfoI
.
get
(
"BEFORETIME"
));
sessionUser
.
put
(
"BEFORETIME"
,
jt
.
date3string
((
Date
)
userInfoI
.
get
(
"BEFORETIME"
)));
sessionUser
.
put
(
"SESSIONID"
,
request
.
getSession
().
getId
());
sessionUser
.
put
(
"SESSIONID"
,
request
.
getSession
().
getId
());
sessionUser
.
put
(
"CURRENTTIME"
,
jt
.
now_datetime
());
sessionUser
.
put
(
"CURRENTTIME"
,
jt
.
now_datetime
());
sessionUser
.
put
(
"LOGINIP"
,
request
.
getRemoteAddr
());
sessionUser
.
put
(
"LOGINIP"
,
request
.
getRemoteAddr
());
sessionUser
.
put
(
"SERVERIP"
,
request
.
getLocalAddr
());
sessionUser
.
put
(
"SERVERIP"
,
request
.
getLocalAddr
());
sessionUser
.
put
(
"QUANXIAN"
,
u_all_m
);
sessionUser
.
put
(
"QUANXIAN"
,
u_all_m
);
sessionUser
.
put
(
"SESSIONUSER"
,
request
.
getSession
());
request
.
getSession
().
setAttribute
(
"userInfo"
,
sessionUser
);
request
.
getSession
().
setAttribute
(
"userInfo"
,
sessionUser
);
//增加登陆日志
//增加登陆日志
Map
<
String
,
Object
>
log
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
log
=
new
HashMap
<
String
,
Object
>();
...
@@ -60,6 +67,8 @@ public class CasAction extends BasicAction {
...
@@ -60,6 +67,8 @@ public class CasAction extends BasicAction {
log
.
put
(
"OPETYPE"
,
"B/S登陆"
);
log
.
put
(
"OPETYPE"
,
"B/S登陆"
);
systemOpeBusiness
.
insert_log
(
log
);
systemOpeBusiness
.
insert_log
(
log
);
}
}
}
String
strRedirecturl
=
request
.
getParameter
(
"redirectUrl"
);
String
strRedirecturl
=
request
.
getParameter
(
"redirectUrl"
);
String
toUrl
=
""
;
String
toUrl
=
""
;
if
(
strRedirecturl
!=
null
&&
strRedirecturl
.
length
()
>
0
)
{
if
(
strRedirecturl
!=
null
&&
strRedirecturl
.
length
()
>
0
)
{
...
...
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