💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
### 插入 #### 不返回主键 ``` @Insert({"insert into person (name, age) values (#{name}, #{age})"}) int insertPerson(Person person); ``` #### 返回自增主键 ``` @Insert({"insert into person (name, age) values (#{name}, #{age})"}) @Options(useGeneratedKeys = true, keyProperty = "id") Person insertPersonGetId(Person person); ``` ### 返回非自增主键 ``` @Insert({"insert into person (name, age) values (#{name}, #{age})"}) @SelectKey(statement="select last_insert_id()", keyProperty="id", resultType=Long.class, before=false) Person insertPersonGetId(Person person); ```