SimpleDateFormat si = new SimpleDateFormat("yyyy-MM-dd"); Date p1 = si.parse("2009-1-10"); Date p2 = si.parse("2010-1-10"); SqlSession sqlSession = MybatisUtil.getsqlSession(); BookDao dao = sqlSession.getMapper(BookDao.class); Book b = new Book(null, "fdfdfdfd3", "哈哈哈", "hhh", "郑州", p1, "第一版", p2, "3次", "333", 12369, 99, "六本", "原木纸", "看看", 100.0, 30.0, null, "编辑推荐", "很好", "暑期", "10", "voug", 30, 200, 94); dao.addBook(b); sqlSession.commit(); sqlSession.close();
以粮为纲全面发展