映射自增主键代码
~~~
public void testMapper_insert_book_AutoIncrementId() throws DataAccessException {
System.out.println("--------------------------------- 取自增ID");
Map<String, Object> map = new HashMap<String, Object>();
map.put("bookName", "自增主键ID的用法");
ResultMo rm = mlinkmapper.executeMapper("insert_book", map);
if (rm != null) {
System.out.println("rm.getAutoIncrementId()>>"+rm.getAutoIncrementId());
}
}
~~~
public void testMapper_insert_book() throws DataAccessException {
System.out.println("--------------------------------- insert_book");
int affect = mlinkmapper.insert("insert_book", "bookName", "Mapper映射使用方法");
System.out.println("affect>>"+affect);
}
public void testMapper_insert_book_AutoIncrementId() throws DataAccessException {
System.out.println("--------------------------------- 取自增ID");
Map<String, Object> map = new HashMap<String, Object>();
map.put("bookName", "自增主键ID的用法");
ResultMo rm = mlinkmapper.executeMapper("insert_book", map);
if (rm != null) {
System.out.println("rm.getAutoIncrementId()>>"+rm.getAutoIncrementId());
}
}