@Test public void testHasMatchUser() { boolean b1 = userService.hasMatchUser("admin", "123456"); boolean b2 = userService.hasMatchUser("admin", "1111"); assertTrue(b1); assertTrue(!b2); }
public boolean hasMatchUser(String userName, String password) { int matchCount =userDao.getMatchCount(userName, password); return matchCount > 0; }
UserService { public boolean hasMatchUser(String userName, String password) { int matchCount =userDao.getMatchCount(userName, password); return matchCount > 0; } }
UserService { public boolean hasMatchUser(String userName, String password) { int matchCount =userDao.getMatchCount(userName, password); return matchCount > 0; }  }
UserService { public boolean hasMatchUser(String userName, String password) { int matchCount =userDao.getMatchCount(userName, password); return matchCount > 0; }  boolean hasMatchUser(String userName, String password); User findUserByUserName(String userName); @Transactional void loginSuccess(User user); @Autowired void setUserDao(UserDao userDao); @Autowired void setLoginLogDao(LoginLogDao loginLogDao); }
UserService { public boolean hasMatchUser(String userName, String password) { int matchCount =userDao.getMatchCount(userName, password); return matchCount > 0; }  boolean hasMatchUser(String userName, String password); User findUserByUserName(String userName); @Transactional void loginSuccess(User user); @Autowired void setUserDao(UserDao userDao); @Autowired void setLoginLogDao(LoginLogDao loginLogDao);  }