예제 #1
0
 public void insertNews(News news) {
   try {
     newsMapper.insert(news);
     session.commit();
   } catch (Exception ignore) {
     logger.error(news.toString());
   }
 }
예제 #2
0
 public List<News> findMetaForIndex(int offsetId, int limit) {
   return newsMapper.findMetaForIndex(offsetId, limit);
 }
예제 #3
0
 /**
  * 给建立索引用
  *
  * @return
  */
 public List<News> findAllMeta() {
   return newsMapper.findAllMeta();
 }
예제 #4
0
 public void truncate() {
   logger.info("begin to truncate newsmodel");
   newsMapper.truncate();
 }