[feat][M]:新增通过用户名密码查找用户的实现

master
Romesum 5 years ago
parent b6310746bf
commit e74fe1f756

@ -9,6 +9,7 @@ public interface UserService {
/**
*
*
* @param user
* @return
*/
@ -19,6 +20,7 @@ public interface UserService {
/**
* u_id
*
* @param uId
* @return
*/
@ -26,6 +28,7 @@ public interface UserService {
/**
*
*
* @param user
* @return
*/
@ -33,8 +36,17 @@ public interface UserService {
/**
* u_id
*
* @param uId
* @return
*/
void deleteById(Integer uId);
/**
*
* @param username
* @param password
* @return
*/
User findByUnameAndPwd(String username, String password);
}

@ -40,4 +40,9 @@ public class UserServiceImpl implements UserService {
public void deleteById(Integer uId) {
userRepository.deleteByUId(uId);
}
@Override
public User findByUnameAndPwd(String username, String password) {
return userRepository.findByUsernameAndPassword(username,password);
}
}

Loading…
Cancel
Save