ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
映射自增主键代码 ~~~ 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()); } }