package cn.autocode.auto.demo.system;

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("smallDEMOService")
public class DemoService extends BaseService {
	
	private static Log log = LogFactory.getLog(DemoService.class);
	
	@Autowired
	private DemoDao smallDEMODao;
	
	/**
	 * 保存记录
	 */
	/*
	public void insert_Demo(Map map) throws SQLException{
		CommUtils.addParams(map, false);
		smallDEMODao.insert_Demo(map);
	}
	*/

	
	/**
	 * 修改记录
	 */
	/*
	public Integer update_Demo(Map map) throws SQLException{
		CommUtils.validateUpdateParams(map);
		CommUtils.addParams(map, true);
		return smallDEMODao.update_Demo(map);
	}
	*/
	
	/**
	 * 删除记录
	 */
	/*
	public Integer delete_Demo(Map map) throws SQLException{
		CommUtils.validateDeleteParams(map);
		return smallDEMODao.delete_Demo(map);
	}
	*/
	
	/**
	 * 批处理删除记录
	 */
	/*
	public Integer batch_delete_Demo(Map map) throws SQLException{
		return smallDEMODao.batch_delete_Demo(map);
	}
	*/
	
	/**
	 * 查询总数
	 */
	/*
	public Integer count_Demo(Map map) throws SQLException{
		return smallDEMODao.count_Demo(map);
	}
	*/
	
	/**
	 * 查询列表记录SELECT
	 */
	/*
	public List<Map> query_Demo(Map map) throws SQLException{
		return smallDEMODao.query_Demo(map);
	}
	*/
	
	/**
	 * 查询一条
	 */
	 
	/*
	public Map get_Demo(Map map) throws SQLException{
		return smallDEMODao.get_Demo(map);
	}
	*/
	
	/**
	 * 导出EXCEL
	 */
	 
	/*
	public Map exportDemo(Map map) throws SQLException{
		return this.listDemoByPage(map);
	}
	*/
	
	/**
	 * Demo 分页
	 */
	/*
	public Map listDemoByPage(Map map) throws SQLException {
		List<Map> list = smallDEMODao.query_Demo(map);
		Integer totalCount = smallDEMODao.count_Demo(map);
		map.clear();
		map.put("total", totalCount);
		map.put("rows", list);
		return map;
	}
	*/
}