Пример #1
0
 @Override
 public List<MonitorTask> findAllMonitorTasks(
     Integer pageIndex, Integer pageSize, Map<String, Object> map) {
   String queryString = " where s.del = 0 ";
   queryString = Utils.getQueryString(queryString, map);
   queryString = queryString + " order by time desc";
   return MonitorTaskDao.findByHql(" from MonitorTask s" + queryString, map, pageSize, pageIndex);
 }
Пример #2
0
 @Override
 public Long findMonitorTaskPages(Integer pageSize, Map<String, Object> map) {
   String queryString = " where s.del = 0  ";
   queryString = Utils.getQueryString(queryString, map);
   String hql = "select count(*) from MonitorTask s" + queryString;
   Long pages = MonitorTaskDao.count(hql, map);
   if (pages % pageSize != 0) {
     pages = pages / pageSize + 1;
   } else {
     pages = pages / pageSize;
   }
   return pages;
 }