使用@insert注解时, 插入数据后返回的id会直接映射到返回的类中
//keyProperty为要映射到返回类的字段, keyColumn数据库对应的字段
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
@Insert({"<script>insert into xxx(...) values(...)</script>"
void addTemporaryHotListCategory(TemporaryHotListDto dto);
上述代码最终会将插入的id, 映射到dto类中的id字段中
Integer addTemporaryHotListCategory(TemporaryHotListDto dto);
如果返回integer类型, 这里返回的将是sql操作后变动的数据条数, 并不是想要的主键id