SmsContentLogDAO extends BaseIbatisDAO { public void updateReport(final Long serialId, final Integer reportStatus, final Date date, final String memo) { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("serialId", serialId); parameters.put("reportStatus", reportStatus); parameters.put("receiveDate", date); parameters.put("memo", memo); super.update("SMS_CONTENT_LOG.updateReport", parameters); }  SmsContentLog save(final SmsContentLog log); void saveBatch(final Map<String, Object> parameters); Object querySmsContentLogByPk(final Long id); @SuppressWarnings({"rawtypes" }) List query(final Map<String, Object> parameters); @SuppressWarnings({ "rawtypes", "unchecked" }) Page pagedQuery(final Map parameterObject, final int currentPage, final int limit); void increaseNumbers(final Serializable id); void updateReport(final Long serialId, final Integer reportStatus, final Date date, final String memo); void updateReport(final String beforeMemo, final Integer reportStatus, final Date date, final String memo); @SuppressWarnings("unchecked") List<SmsLogStat> queryStat(final Map<String, Object> parameters); long queryMMSStat(final Map<String, Object> parameters); void moveSmsContentLogToHis(final Map<String, Object> parameters); long count(final Map<String, Object> parameters); @SuppressWarnings("unchecked") List<SmsContentLog> getListByParams(Map<String, Object> params); Long getListCountByParams(Map<String, Object> params); int updateSmsLog(SmsContentLog smsContentLog); @SuppressWarnings("unchecked") List<SmsContentLog> getSmsLogListByParams(Map<String, Object> paramMap); @SuppressWarnings("unchecked") List<SmsContentLog> getResendSmsLogList();  }
@Test public void testUpdateReport() throws Exception { SmsContentLog log = new SmsContentLog("This is a test log","13917677725"); log.setSerialId(12345678901234L); smsContentLogDAO.save(log); Date now = new Date(); smsContentLogDAO.updateReport(12345678901234L, SmsContentLog.REPORT_FOR_SUCCESS, now, "This is test memo"); SmsContentLog result = (SmsContentLog) smsContentLogDAO.querySmsContentLogByPk(log.getId()); Assert.assertEquals(SmsContentLog.REPORT_FOR_SUCCESS, result.getReportStatus()); Assert.assertNotNull(result.getReceiveDate()); Assert.assertEquals("This is test memo", result.getMemo()); }