Exemplo n.º 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);
 }
Exemplo n.º 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());
 }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
 /**
  * 批量保存
  *
  * @param list
  */
 public void saveBatch(List<UserVipStats> list) {
   userVipStatsDao.saveBatch(list, DBSource.ADMIN);
 }