예제 #1
0
  @Override
  public Pager<Activity> findAllByPage(Pager<Activity> pager, College college) {
    int totalRecord = activityDAO.getTotalRecordByCollege(college);
    pager.setTotalRecord(totalRecord);
    pager.setPageOffset(pager.getPageIndex(), pager.getPageSize());

    List<Activity> activities = activityDAO.queryAllByPageAndCollege(pager, college);
    pager.setDatas(activities);

    return pager;
  }
예제 #2
0
  @Override
  public Pager<Activity> findAllStatusByPage(Pager<Activity> pager, ActivitySearchDto dto) {
    int totalRecord = activityDAO.queryTotalRecord(SysCode.ActivityStatus.APPROVED); // 通过审核的总记录数
    pager.setTotalRecord(totalRecord);

    pager.setPageOffset(pager.getPageIndex(), pager.getPageSize());

    List<Activity> activities = activityDAO.queryAllStatusByPage(pager, dto);
    pager.setDatas(activities);

    return pager;
  }