@Test public void hasMatchUser() { int count = userDao.getMatchCount("admin", "123456"); assertTrue(count>0); }
public int getMatchCount(String userName, String password) { String sqlStr = " SELECT count(*) FROM t_user " + " WHERE user_name =? and password=? "; return jdbcTemplate.queryForInt(sqlStr, new Object[]{userName, password}); }
UserDao { public int getMatchCount(String userName, String password) { String sqlStr = " SELECT count(*) FROM t_user " + " WHERE user_name =? and password=? "; return jdbcTemplate.queryForInt(sqlStr, new Object[]{userName, password}); } }
UserDao { public int getMatchCount(String userName, String password) { String sqlStr = " SELECT count(*) FROM t_user " + " WHERE user_name =? and password=? "; return jdbcTemplate.queryForInt(sqlStr, new Object[]{userName, password}); }  }
UserDao { public int getMatchCount(String userName, String password) { String sqlStr = " SELECT count(*) FROM t_user " + " WHERE user_name =? and password=? "; return jdbcTemplate.queryForInt(sqlStr, new Object[]{userName, password}); }  int getMatchCount(String userName, String password); User findUserByUserName(final String userName); void updateLoginInfo(User user); }
UserDao { public int getMatchCount(String userName, String password) { String sqlStr = " SELECT count(*) FROM t_user " + " WHERE user_name =? and password=? "; return jdbcTemplate.queryForInt(sqlStr, new Object[]{userName, password}); }  int getMatchCount(String userName, String password); User findUserByUserName(final String userName); void updateLoginInfo(User user);  }