添加@Optios注解
keyProperty 将自增的ID返回该属性
@Insert("INSERT INTO admin_method_category (title,sort,icon_type) VALUES(#{category.name},#{category.sort},#{category.type})") @Options(useGeneratedKeys=true, keyProperty="category.id") void addCategory(@Param("category") Category category);