package com.eactive.eai.rms.onl.manage.serviceinfo.eaimsg;

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

import org.springframework.stereotype.Repository;

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

@Repository
public class EaiMsgEasyDeleteDao extends SqlMapClientTemplateDao {

	public Integer selectListCount(Map<String, Object> paramMap) {
		return (Integer) template.queryForObject("EaiMsgEasyDelete.selectListCount", paramMap);
	}

	public List<Map<String, Object>> selectList(Map<String, Object> paramMap) {
		return template.queryForList("EaiMsgEasyDelete.selectList", paramMap);
	}
	
	public List<Map<String, Object>> selectB2bExtList(Map<String, String> paramMap) {
		return template.queryForList("EaiMsgEasyDelete.selectB2bExtList", paramMap);
	}
	
	public List<Map<String, Object>> selectBzwkFldList(Map<String, String> paramMap) {
		return template.queryForList("EaiMsgEasyDelete.selectBzwkFldList", paramMap);
	}

	public List<Map<String, Object>> selectLayoutListByTransform(Map<String, Object> paramMap) {
		return template.queryForList("EaiMsgEasyDelete.selectLayoutListByTransform", paramMap);
	}

	public List<Map<String, Object>> selectLayoutEffects(Map<String, Object> paramMap) {
		return template.queryForList("EaiMsgEasyDelete.selectLayoutEffects", paramMap);
	}

	public void deleteBzwkFldName(Map<String, String> param) {
		template.queryForObject("EaiMsgEasyDelete.deleteBzwkFldName", param);
	}

	public void deleteLayout(Map<String, String> param) {
		template.queryForObject("EaiMsgEasyDelete.deleteLayout", param);
	}

	public void deleteTransform(Map<String, Object> paramMap) {
		template.queryForObject("EaiMsgEasyDelete.deleteTransform", paramMap);
	}

	public List<String> selectEffectConversionNames(Map<String, Object> param) {
		return template.queryForList("EaiMsgEasyDelete.selectEffectConversionNames", param);
	}

	public void deleteWithTableName(String tableName, String keyColName, String keyValue) {
		
		Map<String, Object> paramMap = new HashMap<>();
		paramMap.put("tableName", 	tableName);
		paramMap.put("keyColName", 	keyColName);
		paramMap.put("keyValue", 	keyValue);
		
		template.delete("EaiMsgEasyDelete.deleteWithTableName", paramMap);
	}

}
