Commit 1692e5d2 authored by hezhen's avatar hezhen

123

parent 18639450
...@@ -52,10 +52,12 @@ public class PermissionService { ...@@ -52,10 +52,12 @@ public class PermissionService {
public UserInfo validate(String username,String password){ public UserInfo validate(String username,String password){
UserInfo info = new UserInfo(); UserInfo info = new UserInfo();
User user = userBiz.getUserByUsername(username); User user = userBiz.getUserByUsername(username);
if (user!=null){
if (encoder.matches(password, user.getPassword())) { if (encoder.matches(password, user.getPassword())) {
BeanUtils.copyProperties(user, info); BeanUtils.copyProperties(user, info);
info.setId(user.getId().toString()); info.setId(user.getId().toString());
} }
}
return info; return info;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment