package com.eactive.eai.rms.onl.manage.comm.sysdomain;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.eactive.eai.rms.common.base.BaseService;

@Service("sysDomainService")
public class SysDomainService extends BaseService {

	@Autowired
	@Qualifier("sysDomainDao")
	private SysDomainDao dao;

	public HashMap selectList(int startNum,int endNum, String searchSysDomnName, String searchSysDomnDesc) throws Exception {
		HashMap paramMap = new HashMap();
		//검색 조건 
		paramMap.put("searchSysDomnName", searchSysDomnName);
		paramMap.put("searchSysDomnDesc", searchSysDomnDesc);
 
		// 전체 목록수 얻기
		int totalCount = dao.selectListCount(paramMap);

		paramMap.put("startNum" , startNum);// 시작 record
		paramMap.put("endNum"   , endNum);// 끝 record

		List list = dao.selectList(paramMap);

		HashMap map = new HashMap();

		map.put("totalCount", totalCount);

		map.put("list", list);

		return map;
	}	

	public HashMap selectDetail(String sysDomnName) throws Exception {

		HashMap paramMap = new HashMap();
		paramMap.put("sysDomnName", sysDomnName);

		return dao.selectDetail( paramMap);

	}	

	public void update(HashMap paramMap) throws Exception {
		dao.update(paramMap);
	}	
	public void insert(HashMap paramMap) throws Exception {
		dao.insert(paramMap);
	}
	public void delete(HashMap paramMap) throws Exception {
		dao.delete(paramMap);
	}	


}
