package com.samsung.embo.common.util.dao;

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

import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;

@Repository
public class UtilDao {
	private static final String MAPPER = "utilMapper.";
	private SqlSession sqlSession;

	public UtilDao(SqlSession sqlSession) {
		this.sqlSession = sqlSession;
	}

	public String selectSeqKpiMaster() {
		return sqlSession.selectOne(MAPPER + "selectSeqKpiMaster");
	}

	public List<Map<String, Object>> selectUserDivision(String userId) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("userId", userId);
		return sqlSession.selectList(MAPPER + "selectUserDivision", params);
	}

	public List<Map<String, Object>> selectDivision() {
		return sqlSession.selectList(MAPPER + "selectDivision");
	}

	public List<Map<String, Object>> selectGroupMember(Map<String, Object> params) {

		return sqlSession.selectList(MAPPER + "selectGroupMember");
	}

}
