public List<UserVo> nameSearch(int page, String name) { List<UserVo> list = userDao.nameSearch(name); int total = list.size(); int p = (page - 1) * 20; // start int end = p + 20; // end List<UserVo> list1 = new ArrayList<UserVo>(); for (int i = p; i < end; i++) { if (i == total) { break; } else { list1.add(list.get(i)); } } return list1; }
public List<UserVo> nameMembers(String name) { List<UserVo> list = userDao.nameSearch(name); return list; }