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
713d7156
Commit
713d7156
authored
Jul 22, 2018
by
Menethil
Browse files
Merge remote-tracking branch 'origin/master'
parents
8b59fa57
a4a84d40
Changes
3
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java
View file @
713d7156
...
...
@@ -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-core/src/main/java/org/linlinjava/litemall/core/config/GlobalExceptionHandler.java
View file @
713d7156
package
org.linlinjava.litemall.core.config
;
import
org.linlinjava.litemall.core.util.ResponseUtil
;
import
org.springframework.http.converter.HttpMessageNotReadableException
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -17,11 +18,17 @@ public class GlobalExceptionHandler {
return
ResponseUtil
.
badArgumentValue
();
}
@ExceptionHandler
(
HttpMessageNotReadableException
.
class
)
@ResponseBody
public
Object
httpMessageNotReadableHandler
(
HttpMessageNotReadableException
e
){
e
.
printStackTrace
();
return
ResponseUtil
.
badArgumentValue
();
}
@ExceptionHandler
(
Exception
.
class
)
@ResponseBody
public
Object
exceptionHandler
(
Exception
e
){
e
.
printStackTrace
();
return
ResponseUtil
.
serious
();
}
}
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxAuthController.java
View file @
713d7156
...
...
@@ -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