@Test
  public void testSelectByMethod() {
    List<DubboMethodDayIP> listRedis =
        dubboMethodDayIPService.selectByMethod(
            "pet_public",
            "com.lvmama.comm.bee.service.sync.SyncBaseService",
            "findTriggerPageListWithTime",
            "20151201");

    List<DubboMethodDayIP> listMySql =
        dubboMethodDayIPService.selectByMethod(
            "pet_public",
            "com.lvmama.comm.bee.service.sync.SyncBaseService",
            "findSyncTemplateById",
            "20151118");

    System.out.println("---------------Redis---------------");
    for (DubboMethodDayIP day : listRedis) {
      System.out.println(day);
    }
    System.out.println("------------------------------");

    System.out.println("-------------Mysql-----------------");
    for (DubboMethodDayIP day : listMySql) {
      System.out.println(day);
    }
    System.out.println("------------------------------");
  }
  private void insertOrAppend() {
    Date now = DateUtil.now();

    DubboMethodDayIP day =
        new DubboMethodDayIP(
            "LZY5",
            "com.lvmama.test.soa.monitor.DubboMethodDayIPServiceTest",
            "testInsertOrAppend",
            "111.333.555.777",
            "222.444.666.888",
            DateUtil.trimToDay(now));
    day.setSuccessTimes(10L);
    day.setFailTimes(1L);
    day.setElapsedAvg(BigDecimal.valueOf(2L));
    day.setElapsedMax(5L);
    day.setSuccessTimesDetail(
        DateUtil.HHmm(now) + " " + day.getSuccessTimes() + StringUtil.getLineSeparator());
    day.setFailTimesDetail(
        DateUtil.HHmm(now) + " " + day.getFailTimes() + StringUtil.getLineSeparator());
    day.setElapsedTotalDetail(
        DateUtil.HHmm(now)
            + " "
            + day.getElapsedAvg().multiply(BigDecimal.valueOf(day.getSuccessTimes()))
            + StringUtil.getLineSeparator());
    day.setElapsedMaxDetail(
        DateUtil.HHmm(now) + " " + day.getElapsedMax() + StringUtil.getLineSeparator());

    for (int i = 1; i <= 10; i++) {
      dubboMethodDayIPService.insertOrAppend(day);
      dubboMethodDayIPDao.insert(day);
    }
  }
 @Test
 public void testSelectMergedList() {
   List<DubboMethodDayIP> list =
       dubboMethodDayIPService.selectMergedList(
           "pet_public", "com.lvmama.comm.bee.service.sync.SyncExecuteService", "20151120");
   System.out.println("------------------------------");
   for (DubboMethodDayIP day : list) {
     System.out.println(day);
   }
   System.out.println("------------------------------");
 }