package cn.im.trafficcount.dao;

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;

@Repository("bigScreenDao")
public class BigScreenDao  extends SqlMapClientDaoSupport{

	@Autowired 
    private SqlMapClient sqlMapClient;  
      
	@PostConstruct          
    public  void initSqlMapClient(){  
    	super.setSqlMapClient(sqlMapClient);      
    }
	
	// ==============================  首页地图   =================================
	// 查询摄像头相关信息
	public List<Map> getVideoInfos(Map map){
		return this.getSqlMapClientTemplate().queryForList("getVideoInfos",map);
	}
	// 查询发布屏相关信息
	public List<Map> getLedInfos(Map map){
		return this.getSqlMapClientTemplate().queryForList("getLedInfos",map);
	}
	// 查询诱导灯相关信息
	public List<Map> getLightInfos(Map map){
		return this.getSqlMapClientTemplate().queryForList("getLightInfos",map);
	}
	// 点击圈圈查询事件详情 
	public List<Map> getEventInfo(Map map) {
		return this.getSqlMapClientTemplate().queryForList("getEventInfo",map);
	}
	
	//查询相机详情
	public Map getSbtdspsr(Map map) {
		return (Map) this.getSqlMapClientTemplate().queryForObject("getSbtdspsr", map);
	}
	
	//首页右侧查询
	public List<Map> getEventAlarm(Map map) {
		return this.getSqlMapClientTemplate().queryForList("getEventAlarm",map);
	}
	//首页右侧查询
	public Integer getEventAlarmCount(Map map) {
		return (Integer) this.getSqlMapClientTemplate().queryForObject("getEventAlarmCount",map);
	}
		
}
