Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
c88af083
Commit
c88af083
authored
Jul 22, 2018
by
Junling Bu
Browse files
fix[litemall-admin-api]: 管理后台的后台服务需要密码加密存储。
parent
b8ce23bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java
View file @
c88af083
...
...
@@ -89,6 +89,12 @@ public class AdminUserController {
public
Object
update
(
@LoginAdmin
Integer
adminId
,
@RequestBody
LitemallUser
user
){
logger
.
debug
(
user
);
// 用户密码加密存储
String
password
=
user
.
getPassword
();
BCryptPasswordEncoder
encoder
=
new
BCryptPasswordEncoder
();
String
encodedPassword
=
encoder
.
encode
(
password
);
user
.
setPassword
(
encodedPassword
);
userService
.
update
(
user
);
return
ResponseUtil
.
ok
(
user
);
}
...
...
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxAuthController.java
View file @
c88af083
...
...
@@ -326,7 +326,6 @@ public class WxAuthController {
user
=
userList
.
get
(
0
);
}
// TODO 重新生成的密码无法登陆
BCryptPasswordEncoder
encoder
=
new
BCryptPasswordEncoder
();
String
encodedPassword
=
encoder
.
encode
(
password
);
user
.
setPassword
(
encodedPassword
);
...
...
Write
Preview
Supports
Markdown
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