Example #1
0
  //	@Test
  public void testQueryObjsCount() {
    TRuleNewCond cond = new TRuleNewCond();
    cond.setSid(145L);

    try {
      Integer num = truleNewMapper.queryObjsCount(cond);
      System.out.println("num - " + num);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Example #2
0
 //	@Test
 public void testQueryObjsList() {
   Assert.notNull(this.truleNewMapper);
   TRuleNewCond cond = new TRuleNewCond();
   cond.setSid(86L);
   cond.setStartRecords(0);
   cond.setEndRecords(10);
   try {
     List list = this.truleNewMapper.queryObjsList(cond);
     System.out.print(list.size());
     System.out.print(list.toString());
   } catch (SQLException e) {
     e.printStackTrace();
   }
 }
Example #3
0
  // @Test
  public void testUpdate() {
    TRuleNewCond cond = new TRuleNewCond();
    TRuleNew truleNew = new TRuleNew();
    truleNew.setSid(84L);
    truleNew.setRuleName("哈哈哈");
    truleNew.setActiveBeginTime(Date.valueOf("2001-09-09"));

    cond.setTruleNew(truleNew);
    try {
      truleNewMapper.update(cond.getTruleNew());

    } catch (SQLException e) {
      e.printStackTrace();
    }
  }
Example #4
0
  @Test
  public void testInsert() {
    TRuleNewCond cond = new TRuleNewCond();
    TRuleNew truleNew = new TRuleNew();

    truleNew.setActiveEndTime(Date.valueOf("2012-03-03"));
    truleNew.setRuleName("新规则");
    truleNew.setActiveBeginTime(Date.valueOf("2012-02-03"));
    truleNew.setCreateTime(Date.valueOf("2012-02-03"));
    truleNew.setFlag(1);
    //			truleNew.setCreateUser("shiying");
    //			truleNew.setUpdateTime(Date.valueOf("2012-02-03"));
    //			truleNew.setUpdateUser("shiying");

    cond.setTruleNew(truleNew);
    try {
      truleNewMapper.insert(cond.getTruleNew());

    } catch (SQLException e) {
      e.printStackTrace();
    }
  }