/** * 分页列表 * * @param pageSize * @param currentPage * @return */ public IPage<UserVipStats> findList(int pageSize, int currentPage) { userVipStatsDao.closeSession(DBSource.ADMIN); return userVipStatsDao.findPage( "from UserVipStats stats where stats.sysNum = " + CustomerContextHolder.getSystemNum(), new ArrayList<Object>(), pageSize, currentPage); }
/** * 在给定日期内的分页列表 * * @param pageSize * @param currentPage * @param startDate * @param endDate * @return */ public IPage<UserVipStats> findListInDate( int pageSize, int currentPage, Date startDate, Date endDate) { List<Object> list = new ArrayList<Object>(); list.add(CustomerContextHolder.getSystemNum()); list.add(startDate); list.add(endDate); userVipStatsDao.closeSession(DBSource.ADMIN); return userVipStatsDao.findPage( "from UserVipStats stats where stats.sysNum = ? and stats.time between ? and ?", list, pageSize, currentPage); }