Beispiel #1
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();
    }
  }
Beispiel #2
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();
    }
  }