Пример #1
0
 /**
  * 分页列表
  *
  * @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);
 }
Пример #2
0
 /**
  * 删除某天采集的数据
  *
  * @param dateStr
  */
 public void delete(String dateStr) {
   StringBuilder sql = new StringBuilder();
   sql.append("delete from UserVipStats where TIME = '");
   sql.append(dateStr);
   sql.append("'");
   sql.append(" and SYS_NUM = ");
   sql.append(CustomerContextHolder.getSystemNum());
   userVipStatsDao.closeSession(DBSource.ADMIN);
   userVipStatsDao.execute(sql.toString());
 }
Пример #3
0
 /**
  * 在给定日期内的分页列表
  *
  * @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);
 }