LetterTemplateDAO extends BaseIbatisDAO { public Long countTemplate(Map<String, Object> parameters) { parameters.remove("maxResult"); parameters.remove("skipResult"); return (Long)super.queryForObject("ONLINE_LETTER_TEMPLATE.countTemplate", parameters); }  Long insertTemplate(LetterTemplate template); int updateTemplate(LetterTemplate template); List<LetterTemplate> queryTemplate(Map<String, Object> parameters); Long countTemplate(Map<String, Object> parameters);  }
@Test public void testCountTemplate() { Map<String,Object> parameters = new HashMap<String,Object>(); parameters.put("beginTime", new Date()); parameters.put("endTime", new Date()); parameters.put("keywords", "baidu"); Long count = letterTemplateDAO.countTemplate(parameters); }