Java Code Examples for org.apache.ibatis.mapping.StatementType#STATEMENT
The following examples show how to use
org.apache.ibatis.mapping.StatementType#STATEMENT .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlogMapper.java From jcalaBlog with MIT License | 5 votes |
@Insert({"insert into blog_view " , "(date,title,article,tags,md) " , "values(#{bv.date},#{bv.title}," , "#{bv.article},#{bv.tags},#{bv.md})"}) @SelectKey(before=false,keyProperty="bv.vid",resultType=Integer.class, statementType= StatementType.STATEMENT,statement="SELECT LAST_INSERT_ID() AS id") int insertBlog(@Param("bv") BlogView blogView);
Example 2
Source File: BlogMapper.java From luckyBlog with Apache License 2.0 | 5 votes |
@Insert({"insert into blog_view " , "(date,title,article,tags,md) " , "values(#{bv.date},#{bv.title}," , "#{bv.article},#{bv.tags},#{bv.md})"}) @SelectKey(before=false,keyProperty="bv.vid",resultType=Integer.class, statementType= StatementType.STATEMENT,statement="SELECT LAST_INSERT_ID() AS id") int insertBlog(@Param("bv") BlogView blogView) throws RuntimeException;
Example 3
Source File: CommonMapper.java From uncode-dal-all with GNU General Public License v2.0 | 2 votes |
/** * 新增 * 所有字段传入 model.params,不能为空 * @param model * @return */ @InsertProvider(method = "insert", type = SqlTemplate.class) @SelectKey(before=false,keyProperty="params.id",resultType=Object.class,statementType=StatementType.STATEMENT,statement="SELECT LAST_INSERT_ID() AS id") int insert(Table model);