package com.chenyang.nse.bussiness.service.console.impl;

import com.chenyang.nse.bussiness.dao.PageInfo;
import com.chenyang.nse.bussiness.dao.table.console.TConsoleFastManageDao;
import com.chenyang.nse.bussiness.entity.orm.table.console.TConsoleFastManage;
import com.chenyang.nse.bussiness.service.console.FastManageService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class FastManageServiceImpl implements FastManageService {
   @Autowired
   private TConsoleFastManageDao tConsoleFastManageDao;

   public List<TConsoleFastManage> query(PageInfo pageInfo) {
      pageInfo.setCount(this.tConsoleFastManageDao.count());
      List<TConsoleFastManage> list = this.tConsoleFastManageDao.queryByPageInfo(pageInfo);
      return list;
   }

   public void save(TConsoleFastManage tConsoleFastManage) {
      this.tConsoleFastManageDao.save(tConsoleFastManage);
   }

   public void update(TConsoleFastManage tConsoleFastManage) {
      this.tConsoleFastManageDao.saveOrUpdate(tConsoleFastManage);
   }

   public void remove(String id) {
      this.tConsoleFastManageDao.removeById(id);
   }
}
