Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public List<UserVo> nameMembers(String name) {
   List<UserVo> list = userDao.nameSearch(name);
   return list;
 }