1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
| <select id="selectByPrimaryKey" resultMap="BaseResultMap" statementType="STATEMENT"> select * from ${tableName} where id = ${id} </select>
<select id="selectByDataHash" resultType="java.lang.Integer"> select count(0) from ${tableName} where data_md5=#{dataMd5} </select>
<delete id="deleteByPrimaryKey" statementType="STATEMENT"> delete from ${tableName} where id = ${id} </delete>
<select id="insertByNativeSQL" resultType="int"> ${nativeSQL}; SELECT last_insert_id() as id </select>
<select id="insertByMap" parameterType="map" resultType="java.lang.Integer"> insert into ${tableName} <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="comId != null"> com_id, </if> <if test="comName != null"> com_name, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id}, </if> <if test="comId != null"> #{comId}, </if> <if test="comName != null"> #{comName}, </if> </trim>; select last_insert_id() as id </select>
<select id="insertSelective" resultType="java.lang.Integer"> insert into ${tableName} <trim prefix="(" suffix=")" suffixOverrides=","> <if test="comId != null"> com_id, </if> <if test="comName != null"> com_name, </if> <if test="appDomain != null"> app_domain, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="comId != null"> #{comId}, </if> <if test="comName != null"> #{comName}, </if> <if test="appDomain != null"> #{appDomain}, </if> </trim>; select last_insert_id() as id </select>
<select id="insertByDomain" resultType="java.lang.Integer"> insert into ${tableName} <trim prefix="(" suffix=")" suffixOverrides=","> <if test="data.id != null"> id, </if> <if test="data.comId != null"> com_id, </if> <if test="data.comName != null"> com_name, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="data.id != null"> #{data.id}, </if> <if test="data.comId != null"> #{data.comId}, </if> <if test="data.comName != null"> #{data.comName}, </if> </trim>; select last_insert_id() as id </select>
|