Unverified Commit 95dedd94 authored by Tboy's avatar Tboy Committed by GitHub
Browse files

Merge pull request #1686 from clay4444/fixSignOutBug

Fix SessionService signOut method exception handle bug
parents 26ed786c 65bb0e03
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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){

    }
  }
}
+3 −0
Original line number Diff line number Diff line
@@ -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);

    }