package com.eactive.eai.rms.ext.meta.epb;

import java.sql.Timestamp;
import java.util.HashMap;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Repository;

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

@Repository
public class EpbMetaApplSyncDao extends SqlMapClientTemplateDao implements EpbMetaSyncDao {
	
	protected final Logger logger = Logger.getLogger(EpbMetaApplSyncDao.class);
	
	@Override
	public List<EpbMetaVo> selectCdList(HashMap paramMap) throws Exception {
		return template.queryForList("EpbMetaSync.selectApplCdList", paramMap);
	}
	
	@Override
	public Timestamp selectLastUpdateDate(HashMap paramMap) throws Exception {
		return (Timestamp) template.queryForObject("EpbMetaSync.selectApplLastUpdateDate", paramMap);
	}
	
	@Override
	public void insertCodeInfo(EpbMetaVo epbMetaVo) {
		template.queryForObject("EpbMetaSync.insertApplCodeInfo", epbMetaVo);
	}
	
	@Override
	public void updateCodeInfo(EpbMetaVo epbMetaVo) {
		template.queryForObject("EpbMetaSync.updateApplCodeInfo", epbMetaVo);
	}

	@Override
	public void mergeAuthToAdmin() {
		template.queryForObject("EpbMetaSync.mergeAuthToAdmin");
	}
	
}
