🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
映射自增主键代码 ~~~ 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()); } }