1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3 <mapper namespace="de.example.mybatis.repository.mapper.AdMapper" >
5 <insert id="insert" parameterType="de.example.mybatis.model.Ad">
6 <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER">
7 SELECT LAST_INSERT_ID()
18 #{companyId,jdbcType=BIGINT},
19 #{companyCategId,jdbcType=BIGINT},
20 #{adMobileImage,jdbcType=VARCHAR},
21 #{createdAt,jdbcType=TIMESTAMP},
22 #{updatedAt,jdbcType=TIMESTAMP},
23 #{adGps,jdbcType=LONGVARBINARY}
28 <update id="updateByPrimaryKey" parameterType="de.example.mybatis.model.Ad">
32 company_id = #{companyId,jdbcType=BIGINT},
33 company_categ_id = #{companyCategId,jdbcType=BIGINT},
34 ad_mobile_image = #{adMobileImage,jdbcType=VARCHAR},
35 created_at = #{createdAt,jdbcType=TIMESTAMP},
36 updated_at = #{updatedAt,jdbcType=TIMESTAMP}
38 id = #{id,jdbcType=BIGINT}
42 <select id="selectAsList" resultType="de.example.mybatis.model.Ad"
43 flushCache="false" useCache="true" timeout="10000" statementType="PREPARED">
48 <select id="selectAsSet" resultType="de.example.mybatis.model.Ad"
49 flushCache="false" useCache="true" timeout="10000" statementType="PREPARED">