Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
3d9c37d5
Commit
3d9c37d5
authored
Jun 14, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录缓存
parent
12092eb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+10
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
3d9c37d5
...
...
@@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.Cookie
;
...
...
@@ -196,6 +197,13 @@ public class LoginController extends WebBaseController {
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
return
model
;
}
Object
flag
=
RedisUtil
.
getCache
(
random
);
if
(
null
==
flag
)
{
logger
.
info
(
"无缓存"
);
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error?errorCode=1005"
,
false
,
false
));
return
model
;
}
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
o
);
logger
.
info
(
"登录信息={}"
,
jsonObject
.
toString
());
String
gicEnterpriseId
=
jsonObject
.
getString
(
"enterpriseId"
);
...
...
@@ -235,6 +243,7 @@ public class LoginController extends WebBaseController {
new
RedirectView
(
"/haoban-3/#/gic-error?errorCode="
+
errorCode
,
false
,
false
));
return
model
;
}
RedisUtil
.
delCache
(
random
)
;
return
null
;
}
...
...
@@ -522,6 +531,7 @@ public class LoginController extends WebBaseController {
String
ret
=
JSONObject
.
toJSONString
(
retMap
);
AES
aes
=
SecureUtil
.
aes
(
LOGIN_KEY
.
getBytes
());
String
random
=
aes
.
encryptHex
(
ret
);
RedisUtil
.
setCache
(
random
,
1
,
10L
,
TimeUnit
.
MINUTES
);
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/loginMore?random="
+
random
,
false
,
false
));
return
model
;
}
...
...
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