Package com.eatle.utils

Examples of com.eatle.utils.Pagination


        criteria.andMerchantIdEqualTo(Long.parseLong((String) queryMap.get("merchantId")));
      }
      else
      {
        // 如果未传入商家ID则停止查询,否则会查询到所有的餐厅(安全漏洞)
        return new Pagination(pageSize, currentPage, 0, new ArrayList<UserMerchant>());
      }
      if (queryMap.containsKey("userName"))
      {
        User user = new User();
        user.setUserName((String) queryMap.get("userName"));
        user = userService.find(user);
        if(user != null)
        {
          criteria.andUserIdEqualTo(user.getId());
        }
      }
    }
    // 设置分页参数
    userMerchantCriteria.setPageSize(pageSize);
    userMerchantCriteria.setStartIndex((currentPage - 1) * pageSize);
    List<UserMerchant> items = userMerchantMapper.selectByCriteria(userMerchantCriteria);
    for(UserMerchant um : items)
    {
      um.setUserName(userService.findById(um.getUserId()).getUserName());
      um.setMerchantName(merchantService.findById(um.getMerchantId()).getMerchantName());
      um.setManageRestaurantListStr(restaurantService.findByMultiIds(um.getManageRestaurantList().split(","), " | "));
    }
    int totalCount = (int) userMerchantMapper.selectCountByCriteria(userMerchantCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here


    roleCriteria.setStartIndex((currentPage - 1) * pageSize);

    List<Role> items = roleMapper.selectByCriteria(roleCriteria);
    int totalCount = (int) roleMapper.selectCountByCriteria(roleCriteria);

    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here

    {
      handleAdvert(ad);
    }
   
    int totalCount = (int) advertMapper.selectCountByCriteria(advertCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here

      // 处理时间
      if(fb.getHandleTime() != null)
        fb.setHandleTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(fb.getHandleTime()));
    }
    int totalCount = (int) feedbackMapper.selectCountByCriteria(feedbackCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here

    {
      fl.setIsDisplayStr(showFriendLinkHtml.get("" + fl.getIsDisplay()));
    }
   
    int totalCount = (int) friendshipLinkMapper.selectCountByCriteria(friendshipLinkCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here

    // 设置分页参数
    advertPositionCriteria.setPageSize(pageSize);
    advertPositionCriteria.setStartIndex((currentPage - 1) * pageSize);
    List<AdvertPosition> items = advertPositionMapper.selectByExampleWithBLOBs(advertPositionCriteria);
    int totalCount = (int) advertPositionMapper.selectCountByCriteria(advertPositionCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here

      // 处理时间
      if(rm.getHandleTime() != null)
        rm.setHandleTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(rm.getHandleTime()));
    }
    int totalCount = (int) recommendMerchantMapper.selectCountByCriteria(recommendMerchantCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here

      // 审核时间
      if(info.getAuditTime() != null)
        info.setAuditTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(info.getAuditTime()));
    }
    int totalCount = (int) joinInformationMapper.selectCountByCriteria(joinInformationCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here

    // 设置分页参数
    serviceInformationCriteria.setPageSize(pageSize);
    serviceInformationCriteria.setStartIndex((currentPage - 1) * pageSize);
    List<ServiceInformation> items = serviceInformationMapper.selectByCriteria(serviceInformationCriteria);
    int totalCount = (int) serviceInformationMapper.selectCountByCriteria(serviceInformationCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here

        sn.setSendTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(sn.getSendTime()));
      // 公告对象
      sn.setTargetStr(userIdentityHtml.get("" + sn.getTarget()));
    }
    int totalCount = (int) systemNoticeMapper.selectCountByCriteria(systemNoticeCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here

TOP

Related Classes of com.eatle.utils.Pagination

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.