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
b4b412c6
Commit
b4b412c6
authored
Feb 15, 2017
by
lee_mingzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify updateAt column when modify user password
parent
971eda99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
UserServiceImpl.java
...cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
+8
-1
No files found.
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserServiceImpl.java
View file @
b4b412c6
...
...
@@ -113,6 +113,13 @@ public class UserServiceImpl implements IUserService {
return
userRepository
.
findByPhoneNo
(
phoneNo
)
!=
null
;
}
/**
* 修改用户密码
* @date 2017-02-15 修改用户修改密码时,更新updatedAt时间
* @param phoneNo
* @param password
* @return
*/
@Override
@CacheEvict
(
value
=
"usercache"
,
key
=
"'xyqbuser' + #phone"
,
cacheManager
=
"cacheManager"
)
public
boolean
resetPassword
(
String
phoneNo
,
String
password
)
{
...
...
@@ -121,7 +128,7 @@ public class UserServiceImpl implements IUserService {
if
(
user
==
null
)
{
throw
new
RuntimeException
(
"用户["
+
phoneNo
+
"]不存在"
);
}
user
.
setUpdatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
user
.
setPassword
(
PasswordUtil
.
MD5
(
password
.
toLowerCase
()
+
Constants
.
PASSWORD_SALT
));
user
=
userRepository
.
save
(
user
);
stringRedisTemplate
.
expire
(
"usercache:xyqbuser"
+
phoneNo
,
1L
,
TimeUnit
.
MILLISECONDS
);
...
...
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