ProdInsuranceDAO extends BaseIbatisDAO { public ProdInsurance insert(ProdInsurance insurance) { if (null != insurance) { super.insert("PROD_INSUANCE.insert", insurance); return insurance; } else { return null; } }  ProdInsurance insert(ProdInsurance insurance); ProdInsurance update(ProdInsurance insurance); Long selectRowCount(Map<String, Object> param); @SuppressWarnings("unchecked") List<ProdInsurance> queryProdInsuranceByMap(Map<String, Object> param); ProdInsurance queryProdInsuranceByPK(Long productId);  }
@Test public void testInsert() throws Exception { ProdInsurance insurance = new ProdInsurance(); insurance.setProductId(123L); insurance.setSellPrice(1000L); insurance.setSettlementPrice(800L); insurance.setDays(3); insurance.setProductIdSupplier("12"); insurance.setProductTypeSupplier("test"); prodInsuranceDAO.insert(insurance); String sql = "select * from prod_insurance where product_id = 123"; Statement stat = conn.createStatement(); ResultSet rs = stat.executeQuery(sql); rs.next(); }