Commit 1692e5d2 authored by hezhen's avatar hezhen

123

parent 18639450
...@@ -52,9 +52,11 @@ public class PermissionService { ...@@ -52,9 +52,11 @@ 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 (encoder.matches(password, user.getPassword())) { if (user!=null){
BeanUtils.copyProperties(user, info); if (encoder.matches(password, user.getPassword())) {
info.setId(user.getId().toString()); BeanUtils.copyProperties(user, info);
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