Showing
2 changed files
with
4 additions
and
3 deletions
1 | package com.xkl.service; | 1 | package com.xkl.service; |
2 | 2 | ||
3 | +import com.xkl.config.Constants; | ||
3 | import com.xkl.domain.User; | 4 | import com.xkl.domain.User; |
4 | import com.xkl.repository.UserRepository; | 5 | import com.xkl.repository.UserRepository; |
5 | import com.xkl.security.SecurityTool; | 6 | import com.xkl.security.SecurityTool; |
@@ -15,7 +16,7 @@ public class LoginServiceImpl implements ILoginService{ | @@ -15,7 +16,7 @@ public class LoginServiceImpl implements ILoginService{ | ||
15 | private UserRepository userRepository; | 16 | private UserRepository userRepository; |
16 | @Override | 17 | @Override |
17 | public User check(String username, String password) { | 18 | public User check(String username, String password) { |
18 | - User user = userRepository.findByLoginAccount(username); | 19 | + User user = userRepository.findByLoginAccountAndStatus(username, Constants.STATUS_OK2); |
19 | 20 | ||
20 | if (user == null) { //用户不存在 | 21 | if (user == null) { //用户不存在 |
21 | return null; | 22 | return null; |
-
Please register or login to post a comment