Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
6e6d8c7f
Commit
6e6d8c7f
authored
Nov 30, 2017
by
Java—红包—徐 然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改清除缓冲bug,内部嵌套注解不好使
parent
c937ac4b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+2
-0
ISessionService.java
...a/cn/quantgroup/xyqb/service/session/ISessionService.java
+2
-0
SessionServiceImpl.java
...ntgroup/xyqb/service/session/impl/SessionServiceImpl.java
+4
-6
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
6e6d8c7f
...
@@ -731,6 +731,7 @@ public class InnerController implements IBaseController {
...
@@ -731,6 +731,7 @@ public class InnerController implements IBaseController {
user
=
userService
.
saveUser
(
user
);
user
=
userService
.
saveUser
(
user
);
if
(!
user
.
getEnable
())
{
if
(!
user
.
getEnable
())
{
sessionService
.
deleteByUserId
(
userId
);
sessionService
.
deleteByUserId
(
userId
);
sessionService
.
deleteUserCatch
(
user
);
}
}
LOGGER
.
info
(
"去清除函谷关的缓存"
);
LOGGER
.
info
(
"去清除函谷关的缓存"
);
httpService
.
get
(
hanguguanUrl
.
concat
(
"/innerapi/disableUserCache"
),
ImmutableMap
.
of
(
"phone"
,
user
.
getPhoneNo
()));
httpService
.
get
(
hanguguanUrl
.
concat
(
"/innerapi/disableUserCache"
),
ImmutableMap
.
of
(
"phone"
,
user
.
getPhoneNo
()));
...
@@ -752,6 +753,7 @@ public class InnerController implements IBaseController {
...
@@ -752,6 +753,7 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildErrorStateResult
(
"未查询到该用户,用户phoneNo:"
+
phoneNo
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"未查询到该用户,用户phoneNo:"
+
phoneNo
,
null
);
}
}
sessionService
.
deleteByUserId
(
user
.
getId
());
sessionService
.
deleteByUserId
(
user
.
getId
());
sessionService
.
deleteUserCatch
(
user
);
LOGGER
.
info
(
"删除用户缓存信息,phoneNo:{},userId:{},"
,
user
.
getPhoneNo
(),
user
.
getId
());
LOGGER
.
info
(
"删除用户缓存信息,phoneNo:{},userId:{},"
,
user
.
getPhoneNo
(),
user
.
getId
());
return
JsonResult
.
buildSuccessResult
(
"用户缓存信息已经删除"
,
null
);
return
JsonResult
.
buildSuccessResult
(
"用户缓存信息已经删除"
,
null
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/service/session/ISessionService.java
View file @
6e6d8c7f
...
@@ -28,4 +28,6 @@ public interface ISessionService {
...
@@ -28,4 +28,6 @@ public interface ISessionService {
SessionStruct
findSessionBySessionId
(
String
sessionId
);
SessionStruct
findSessionBySessionId
(
String
sessionId
);
void
deleteByUserId
(
long
userId
);
void
deleteByUserId
(
long
userId
);
void
deleteUserCatch
(
User
user
);
}
}
src/main/java/cn/quantgroup/xyqb/service/session/impl/SessionServiceImpl.java
View file @
6e6d8c7f
...
@@ -200,11 +200,8 @@ public class SessionServiceImpl implements ISessionService {
...
@@ -200,11 +200,8 @@ public class SessionServiceImpl implements ISessionService {
}
}
//3.删除用户查询缓存
User
user
=
userService
.
findById
(
userId
);
if
(
null
!=
user
)
{
deleteUserCatch
(
user
);
}
}
}
...
@@ -220,7 +217,8 @@ public class SessionServiceImpl implements ISessionService {
...
@@ -220,7 +217,8 @@ public class SessionServiceImpl implements ISessionService {
@CacheEvict
(
value
=
"contact"
,
key
=
"'contact' + #user.id"
,
cacheManager
=
"cacheManager"
),
@CacheEvict
(
value
=
"contact"
,
key
=
"'contact' + #user.id"
,
cacheManager
=
"cacheManager"
),
@CacheEvict
(
value
=
"userSpouseCache"
,
key
=
"'spouse' + #user.id"
,
cacheManager
=
"cacheManager"
),
@CacheEvict
(
value
=
"userSpouseCache"
,
key
=
"'spouse' + #user.id"
,
cacheManager
=
"cacheManager"
),
@CacheEvict
(
value
=
"btRegisterCache"
,
key
=
"'userId' + #user.id"
,
cacheManager
=
"cacheManager"
)})
@CacheEvict
(
value
=
"btRegisterCache"
,
key
=
"'userId' + #user.id"
,
cacheManager
=
"cacheManager"
)})
private
void
deleteUserCatch
(
User
user
)
{
@Override
public
void
deleteUserCatch
(
User
user
)
{
}
}
}
}
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