示例#1
0
文件: UserDao.java 项目: y3wegy/Web
 public User mapRow(ResultSet resultSet, int i) throws SQLException {
   User user = new User();
   user.setUserName(resultSet.getString("NAME"));
   user.setPassWord(resultSet.getString("PASSWORD"));
   user.setRole(UserRole.prase(resultSet.getString("ROLE")));
   return user;
 }
示例#2
0
文件: UserDao.java 项目: y3wegy/Web
 @Transactional
 public List<User> getUser(User user) {
   return jdbcTemplate.query(
       QUERY_USER_SQL,
       new Object[] {user.getUserName()},
       new int[] {Types.VARCHAR},
       new PersonRowMapper());
 }