package cn.yw.alarmtaskmanage.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;
import com.ibatis.sqlmap.client.SqlMapClient;

import cn.base.dao.BaseSqlMapDAO;

@Repository("ywalarmrulefordeviceDao")
public class YwalarmrulefordeviceDao  extends BaseSqlMapDAO{
	
	
	
	/**
	 * 增加记录
	 */
	
	public void insert_Ywalarmrulefordevice(Map map) throws SQLException{
		this.insert("insert_Ywalarmrulefordevice",map);
	}
	
	
	/**
	 * 批处理增加记录
	 */
	/*
	public void batch_insert_Ywalarmrulefordevice(List batch) throws SQLException{
		this.getSqlMapClientTemplate().insert("batch_insert_Ywalarmrulefordevice",batch);
	}
	*/
	 
	/**
	 * 修改记录
	 */
	
	public Integer update_Ywalarmrulefordevice(Map map) throws SQLException{
		return this.update("update_Ywalarmrulefordevice",map);
	}
	
	
	/**
	 * 删除记录
	 */
	
	public Integer delete_Ywalarmrulefordevice(Map map) throws SQLException{
		return this.delete("delete_Ywalarmrulefordevice",map);
	}
	
	
	/**
	 * 批处理删除记录
	 */
	
	
	public Integer batch_delete_Ywalarmrulefordevice(Map map) throws SQLException{
		return this.delete("batch_delete_Ywalarmrulefordevice",map);
	}
	
	
	/**
	 * 查询总数
	 */
	
	public Integer count_Ywalarmrulefordevice(Map map) throws SQLException{
		return (Integer)this.queryForObject("count_Ywalarmrulefordevice",map);
	}
	
	
	/**
	 * 查询列表记录
	 */

	
	public List<Map> query_Ywalarmrulefordevice(Map map) throws SQLException{
		return this.queryForPage("query_Ywalarmrulefordevice",map);
	}
	
	
	/**
	 * 查询列表记录
	 */
	
	public Map get_Ywalarmrulefordevice(Map map) throws SQLException{
		return (Map) this.queryForObject("query_Ywalarmrulefordevice",map);
	}
	
	// 更新
	public Integer edit_Ywalarmrulefordevice(Map map) throws SQLException{
		return this.update("edit_Ywalarmrulefordevice",map);
	}
	
	//监控告警类型查询
	public List<Map> get_leftVideoDevice(Map map) throws SQLException{
		return this.queryForPage("get_leftVideoDevice",map);
	}
	//总数
	public Integer get_leftVideoDeviceCount(Map map) throws SQLException{
		return (Integer) this.queryForObject("get_leftVideoDeviceCount",map);
	}
	
	//服务器告警类型查询
	public List<Map> get_leftServerDevice(Map map) throws SQLException{
		return this.queryForPage("get_leftServerDevice",map);
	}
	//总数
	public Integer get_leftServerDeviceCount(Map map) throws SQLException{
		return (Integer) this.queryForObject("get_leftServerDeviceCount",map);
	}
	
	//应用系统告警类型查询
	public List<Map> get_leftSoftDevice(Map map) throws SQLException{
		return this.queryForPage("get_leftSoftDevice",map);
	}
	//总数
	public Integer get_leftSoftDeviceCount(Map map) throws SQLException{
		return (Integer) this.queryForObject("get_leftSoftDeviceCount",map);
	}
	
	//服务器  硬盘 告警类型查询
	public List<Map> get_leftDiskDevice(Map map) throws SQLException{
		return this.queryForPage("get_leftDiskDevice",map);
	}
	//总数
	public Integer get_leftDiskDeviceCount(Map map) throws SQLException{
		return (Integer) this.queryForObject("get_leftDiskDeviceCount",map);
	}
	
	//服务器  cpu 告警类型查询
	public List<Map> get_leftCPUdevice(Map map) throws SQLException{
		return this.queryForPage("get_leftCPUdevice",map);
	}
	//总数
	public Integer get_leftCPUdeviceCount(Map map) throws SQLException{
		return (Integer) this.queryForObject("get_leftCPUdeviceCount",map);
	}
	
	//服务器  内存   告警类型查询
	public List<Map> get_leftMemorydevice(Map map) throws SQLException{
		return this.queryForPage("get_leftMemorydevice",map);
	}
	//总数
	public Integer get_leftMemorydeviceCount(Map map) throws SQLException{
		return (Integer) this.queryForObject("get_leftMemorydeviceCount",map);
	}
}
