Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
f05cbf2a
Commit
f05cbf2a
authored
Aug 07, 2020
by
yuquan.zhu
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改离职提示语
parent
0a9791f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
src/main/java/cn/timer/api/config/interceptor/RedisSessionInterceptor.java
+12
-1
src/main/java/cn/timer/api/utils/ResponseResult.java
+1
-1
No files found.
src/main/java/cn/timer/api/config/interceptor/RedisSessionInterceptor.java
View file @
f05cbf2a
...
...
@@ -58,7 +58,8 @@ public class RedisSessionInterceptor implements HandlerInterceptor {
try
{
QyzxEmpLogin
eld
=
BeanUtil
.
toBean
(
session
.
getAttribute
(
"ui"
),
QyzxEmpLogin
.
class
);
if
(
redisUtil
.
get
(
"BlockUser"
+
eld
.
getId
())!=
null
){
response401
(
response
);
redisUtil
.
del
(
"BlockUser"
+
eld
.
getId
());
response302
(
response
);
return
false
;
}
}
catch
(
Exception
e
){
...
...
@@ -82,6 +83,16 @@ public class RedisSessionInterceptor implements HandlerInterceptor {
}
}
private
void
response302
(
HttpServletResponse
response
)
{
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setContentType
(
"application/json; charset=utf-8"
);
try
{
response
.
getWriter
().
print
(
new
JSONObject
(
new
ResponseResult
().
kickOut
()).
toString
());
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
@Override
public
void
postHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
ModelAndView
modelAndView
)
throws
Exception
{
...
...
src/main/java/cn/timer/api/utils/ResponseResult.java
View file @
f05cbf2a
...
...
@@ -35,7 +35,7 @@ public class ResponseResult extends LinkedHashMap<String, Object> implements Ser
private
static
final
String
MESSAGE_FAIL
=
"操作失败"
;
private
static
final
String
MESSAGE_ERROR
=
"操作错误"
;
private
static
final
String
MESSAGE_UNLOGIN
=
"会话超时,请重新登录"
;
private
static
final
String
MESSAGE_KICKOUT
=
"
当前账户已在其他地方登录
,请重新登录"
;
private
static
final
String
MESSAGE_KICKOUT
=
"
你已被管理员移出公司
,请重新登录"
;
private
static
final
String
MESSAGE_PARAMERROR
=
"参数错误"
;
private
static
final
String
MESSAGE_UNAUTHORIZED
=
"授权错误"
;
private
static
final
String
MESSAGE_UNAUTHENTICATED
=
"认证错误"
;
...
...
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