Fix SessionService signOut method exception handle bug
@ -139,7 +139,6 @@ public class SessionService extends BaseService{
* @param loginUser login user
*/
public void signOut(String ip, User loginUser) {
try {
/**
* query session by user id and ip
@ -147,8 +146,5 @@ public class SessionService extends BaseService{
//delete session
sessionMapper.deleteById(session.getId());
}catch (Exception e){
}
@ -121,6 +121,9 @@ public class SessionServiceTest {
String ip = "127.0.0.1";
User user = new User();
user.setId(userId);
Mockito.when(sessionMapper.queryByUserIdAndIp(userId,ip)).thenReturn(getSession());
sessionService.signOut(ip ,user);