package cn.yw.log.smslog.service;

 import cn.yw.log.smslog.dao.YwalarmsmslogDao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.base.bean.BaseService;
import cn.base.util.CommUtils;

@Service("ywalarmsmslogService")
public class YwalarmsmslogService extends BaseService {
	
	private static Log log = LogFactory.getLog(YwalarmsmslogService.class);
	
	@Autowired
	private YwalarmsmslogDao ywalarmsmslogDao;
	
	/**
	 * 保存记录
	 */
	/*
	public void insert_Ywalarmsmslog(Map map) throws SQLException{
		CommUtils.addParams(map, false);
		ywalarmsmslogDao.insert_Ywalarmsmslog(map);
	}
	*/

	
	/**
	 * 修改记录
	 */
	/*
	public Integer update_Ywalarmsmslog(Map map) throws SQLException{
		CommUtils.validateUpdateParams(map);
		CommUtils.addParams(map, true);
		return ywalarmsmslogDao.update_Ywalarmsmslog(map);
	}
	*/
	
	/**
	 * 删除记录
	 */
	/*
	public Integer delete_Ywalarmsmslog(Map map) throws SQLException{
		CommUtils.validateDeleteParams(map);
		return ywalarmsmslogDao.delete_Ywalarmsmslog(map);
	}
	*/
	
	/**
	 * 批处理删除记录
	 */
	/*
	public Integer batch_delete_Ywalarmsmslog(Map map) throws SQLException{
		return ywalarmsmslogDao.batch_delete_Ywalarmsmslog(map);
	}
	*/
	
	/**
	 * 查询总数
	 */
	/*
	public Integer count_Ywalarmsmslog(Map map) throws SQLException{
		return ywalarmsmslogDao.count_Ywalarmsmslog(map);
	}
	*/
	
	/**
	 * 查询列表记录SELECT
	 */
	/*
	public List<Map> query_Ywalarmsmslog(Map map) throws SQLException{
		return ywalarmsmslogDao.query_Ywalarmsmslog(map);
	}
	*/
	
	/**
	 * 查询一条
	 */
	 
	/*
	public Map get_Ywalarmsmslog(Map map) throws SQLException{
		return ywalarmsmslogDao.get_Ywalarmsmslog(map);
	}
	*/
	
	/**
	 * 导出EXCEL
	 */
	 
	/*
	public Map exportYwalarmsmslog(Map map) throws SQLException{
		return this.listYwalarmsmslogByPage(map);
	}
	*/
	
	/**
	 * Ywalarmsmslog 分页
	 */
	public Map listYwalarmsmslogByPage(Map map) throws SQLException {
		List<Map> list = ywalarmsmslogDao.query_Ywalarmsmslog(map);
		Integer totalCount = ywalarmsmslogDao.count_Ywalarmsmslog(map);
		map.clear();
		map.put("total", totalCount);
		map.put("rows", list);
		return map;
	}
}
