Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sh-ds
Project
Project
Details
Activity
Releases
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
李良停
sh-ds
Commits
0d488e30
Commit
0d488e30
authored
Jan 26, 2021
by
喻春霖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
3cd26ee8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
AuthController.java
...eall/eden/authcenter/agent/controller/AuthController.java
+9
-0
ds.html
eden-authcenter-agent/src/main/resources/templates/ds.html
+1
-1
AuthLog.java
...ava/com/chineseall/eden/authcenter/log/model/AuthLog.java
+9
-0
No files found.
eden-authcenter-agent/src/main/java/com/chineseall/eden/authcenter/agent/controller/AuthController.java
View file @
0d488e30
...
...
@@ -2,6 +2,7 @@ package com.chineseall.eden.authcenter.agent.controller;
import
cn.sh.chineseall.framework.core.util.ArrayUtils
;
import
cn.sh.chineseall.framework.core.util.StringUtils
;
import
cn.sh.chineseall.framework.lang.calendar.DateUtils
;
import
com.chineseall.eden.authcenter.agent.client.AuthUserInfo
;
import
com.chineseall.eden.authcenter.agent.client.ClientDataInfo
;
import
com.chineseall.eden.authcenter.agent.client.ClientItem
;
...
...
@@ -29,6 +30,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Objects
;
...
...
@@ -190,6 +192,13 @@ public class AuthController {
authLog
.
setVersion
(
version
);
authLog
.
setDevice
(
device
);
authLog
.
setOs
(
os
);
Date
now
=
new
Date
();
String
yearMonthDay
=
DateUtils
.
dateToString
(
now
,
"yyyy-MM-dd"
);
String
yearMonth
=
DateUtils
.
dateToString
(
now
,
"yyyy-MM"
);
String
year
=
DateUtils
.
dateToString
(
now
,
"yyyy"
);
authLog
.
setYear
(
year
);
authLog
.
setYearMonth
(
yearMonth
);
authLog
.
setYearMonthDay
(
yearMonthDay
);
authLogService
.
save
(
authLog
);
response
.
sendRedirect
(
loginUrl
);
return
null
;
...
...
eden-authcenter-agent/src/main/resources/templates/ds.html
View file @
0d488e30
...
...
@@ -95,7 +95,7 @@
}
else
if
(
idp
==
"szjc"
)
{
window
.
location
.
href
=
baseUrl
+
"edenoperation&loginUrl="
+
encodeURIComponent
(
loginUrl2
)
+
"&browser="
+
info
.
browser
+
"&device="
+
info
.
device
+
"&os="
+
info
.
os
+
"&version="
+
info
.
version
;
}
else
{
window
.
location
.
href
=
baseUrl
+
"qpjy
&loginUrl="
+
encodeURIComponent
(
loginUrl3
+
"&auth_source="
+
idp
)
+
"&browser="
+
info
.
browser
+
"&device="
+
info
.
device
+
"&os="
+
info
.
os
+
"&version="
+
info
.
version
;
window
.
location
.
href
=
baseUrl
+
idp
+
"
&loginUrl="
+
encodeURIComponent
(
loginUrl3
+
"&auth_source="
+
idp
)
+
"&browser="
+
info
.
browser
+
"&device="
+
info
.
device
+
"&os="
+
info
.
os
+
"&version="
+
info
.
version
;
}
}
</script>
...
...
eden-authcenter-log/src/main/java/com/chineseall/eden/authcenter/log/model/AuthLog.java
View file @
0d488e30
...
...
@@ -70,6 +70,15 @@ public class AuthLog implements CacheDimensionDocument {
@DocumentField
private
String
device
;
@DocumentField
private
String
year
;
@DocumentField
private
String
yearMonth
;
@DocumentField
private
String
yearMonthDay
;
@Override
public
String
[]
generateCacheDimensions
()
{
return
new
String
[
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