|
@@ -5,9 +5,9 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
- <result column="id" jdbcType="BIGINT" property="id" />
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
|
|
|
<result column="line_num" jdbcType="INTEGER" property="lineNum" />
|
|
|
<result column="txt" jdbcType="VARCHAR" property="txt" />
|
|
@@ -19,7 +19,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
@@ -53,7 +53,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
@@ -87,7 +87,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
id, file_name, line_num, txt, similar_txt, commit_time, txt_option
|
|
|
</sql>
|
|
@@ -95,7 +95,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
@@ -122,7 +122,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<if test="example != null and example.distinct">
|
|
@@ -154,11 +154,51 @@
|
|
|
</if>
|
|
|
</if>
|
|
|
</select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from similar
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <choose>
|
|
|
+ <when test="selective != null and selective.length > 0">
|
|
|
+ <foreach collection="selective" item="column" separator=",">
|
|
|
+ ${column.aliasedEscapedColumnName}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ from similar
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
+ -->
|
|
|
+ delete from similar
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
<delete id="deleteByExample" parameterType="com.alvin.dao.entity.example.SimilarExample">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
delete from similar
|
|
|
<if test="_parameter != null">
|
|
@@ -169,21 +209,27 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
- insert into similar (id, file_name, line_num,
|
|
|
- txt, similar_txt, commit_time,
|
|
|
- txt_option)
|
|
|
- values (#{id,jdbcType=BIGINT}, #{fileName,jdbcType=VARCHAR}, #{lineNum,jdbcType=INTEGER},
|
|
|
- #{txt,jdbcType=VARCHAR}, #{similarTxt,jdbcType=VARCHAR}, #{commitTime,jdbcType=TIMESTAMP},
|
|
|
- #{txtOption,jdbcType=VARCHAR})
|
|
|
+ <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
|
|
+ SELECT LAST_INSERT_ID()
|
|
|
+ </selectKey>
|
|
|
+ insert into similar (file_name, line_num, txt,
|
|
|
+ similar_txt, commit_time, txt_option
|
|
|
+ )
|
|
|
+ values (#{fileName,jdbcType=VARCHAR}, #{lineNum,jdbcType=INTEGER}, #{txt,jdbcType=VARCHAR},
|
|
|
+ #{similarTxt,jdbcType=VARCHAR}, #{commitTime,jdbcType=TIMESTAMP}, #{txtOption,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="map">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
+ <selectKey keyProperty="record.id" order="AFTER" resultType="java.lang.Long">
|
|
|
+ SELECT LAST_INSERT_ID()
|
|
|
+ </selectKey>
|
|
|
insert into similar
|
|
|
<choose>
|
|
|
<when test="selective != null and selective.length > 0">
|
|
@@ -193,9 +239,6 @@
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="record.id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
<if test="record.fileName != null">
|
|
|
file_name,
|
|
|
</if>
|
|
@@ -227,9 +270,6 @@
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="record.id != null">
|
|
|
- #{record.id,jdbcType=BIGINT},
|
|
|
- </if>
|
|
|
<if test="record.fileName != null">
|
|
|
#{record.fileName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
@@ -256,7 +296,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
select count(*) from similar
|
|
|
<if test="_parameter != null">
|
|
@@ -267,7 +307,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
update similar
|
|
|
SET
|
|
@@ -311,7 +351,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
update similar
|
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
@@ -325,11 +365,65 @@
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
|
</update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
+ -->
|
|
|
+ update similar
|
|
|
+ SET
|
|
|
+ <choose>
|
|
|
+ <when test="selective != null and selective.length > 0">
|
|
|
+ <foreach collection="selective" item="column" separator=",">
|
|
|
+ ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ <trim suffixOverrides=",">
|
|
|
+ <if test="record.fileName != null">
|
|
|
+ file_name = #{record.fileName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.lineNum != null">
|
|
|
+ line_num = #{record.lineNum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.txt != null">
|
|
|
+ txt = #{record.txt,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.similarTxt != null">
|
|
|
+ similar_txt = #{record.similarTxt,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.commitTime != null">
|
|
|
+ commit_time = #{record.commitTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.txtOption != null">
|
|
|
+ txt_option = #{record.txtOption,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ where id = #{record.id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.alvin.dao.entity.Similar">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
+ -->
|
|
|
+ update similar
|
|
|
+ set file_name = #{fileName,jdbcType=VARCHAR},
|
|
|
+ line_num = #{lineNum,jdbcType=INTEGER},
|
|
|
+ txt = #{txt,jdbcType=VARCHAR},
|
|
|
+ similar_txt = #{similarTxt,jdbcType=VARCHAR},
|
|
|
+ commit_time = #{commitTime,jdbcType=TIMESTAMP},
|
|
|
+ txt_option = #{txtOption,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
<select id="selectOneByExample" parameterType="com.alvin.dao.entity.example.SimilarExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
@@ -346,7 +440,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<choose>
|
|
@@ -368,26 +462,26 @@
|
|
|
</if>
|
|
|
limit 1
|
|
|
</select>
|
|
|
- <insert id="batchInsert" parameterType="map">
|
|
|
+ <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
insert into similar
|
|
|
- (id, file_name, line_num, txt, similar_txt, commit_time, txt_option)
|
|
|
+ (file_name, line_num, txt, similar_txt, commit_time, txt_option)
|
|
|
values
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
- (#{item.id,jdbcType=BIGINT}, #{item.fileName,jdbcType=VARCHAR}, #{item.lineNum,jdbcType=INTEGER},
|
|
|
- #{item.txt,jdbcType=VARCHAR}, #{item.similarTxt,jdbcType=VARCHAR}, #{item.commitTime,jdbcType=TIMESTAMP},
|
|
|
- #{item.txtOption,jdbcType=VARCHAR})
|
|
|
+ (#{item.fileName,jdbcType=VARCHAR}, #{item.lineNum,jdbcType=INTEGER}, #{item.txt,jdbcType=VARCHAR},
|
|
|
+ #{item.similarTxt,jdbcType=VARCHAR}, #{item.commitTime,jdbcType=TIMESTAMP}, #{item.txtOption,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
- <insert id="batchInsertSelective" parameterType="map">
|
|
|
+ <insert id="batchInsertSelective" keyColumn="id" keyProperty="list.id" parameterType="map" useGeneratedKeys="true">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
insert into similar (
|
|
|
<foreach collection="selective" item="column" separator=",">
|
|
@@ -398,9 +492,6 @@
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
(
|
|
|
<foreach collection="selective" item="column" separator=",">
|
|
|
- <if test="'id'.toString() == column.value">
|
|
|
- #{item.id,jdbcType=BIGINT}
|
|
|
- </if>
|
|
|
<if test="'file_name'.toString() == column.value">
|
|
|
#{item.fileName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
@@ -423,11 +514,11 @@
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
- <insert id="upsertSelective" parameterType="map">
|
|
|
+ <insert id="upsertSelective" keyColumn="id" keyProperty="record.id" parameterType="map" useGeneratedKeys="true">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
insert into similar
|
|
|
<choose>
|
|
@@ -530,25 +621,47 @@
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</insert>
|
|
|
- <insert id="upsert" parameterType="com.alvin.dao.entity.Similar">
|
|
|
+ <insert id="upsert" keyColumn="id" keyProperty="id" parameterType="com.alvin.dao.entity.Similar" useGeneratedKeys="true">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 27 15:17:38 CST 2020.
|
|
|
+ This element was generated on Thu Aug 20 14:29:45 CST 2020.
|
|
|
-->
|
|
|
insert into similar
|
|
|
- (id, file_name, line_num, txt, similar_txt, commit_time, txt_option)
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ file_name,
|
|
|
+ line_num,
|
|
|
+ txt,
|
|
|
+ similar_txt,
|
|
|
+ commit_time,
|
|
|
+ txt_option,
|
|
|
+ </trim>
|
|
|
values
|
|
|
- (#{id,jdbcType=BIGINT}, #{fileName,jdbcType=VARCHAR}, #{lineNum,jdbcType=INTEGER},
|
|
|
- #{txt,jdbcType=VARCHAR}, #{similarTxt,jdbcType=VARCHAR}, #{commitTime,jdbcType=TIMESTAMP},
|
|
|
- #{txtOption,jdbcType=VARCHAR})
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ #{fileName,jdbcType=VARCHAR},
|
|
|
+ #{lineNum,jdbcType=INTEGER},
|
|
|
+ #{txt,jdbcType=VARCHAR},
|
|
|
+ #{similarTxt,jdbcType=VARCHAR},
|
|
|
+ #{commitTime,jdbcType=TIMESTAMP},
|
|
|
+ #{txtOption,jdbcType=VARCHAR},
|
|
|
+ </trim>
|
|
|
on duplicate key update
|
|
|
- id = #{id,jdbcType=BIGINT},
|
|
|
- file_name = #{fileName,jdbcType=VARCHAR},
|
|
|
- line_num = #{lineNum,jdbcType=INTEGER},
|
|
|
- txt = #{txt,jdbcType=VARCHAR},
|
|
|
- similar_txt = #{similarTxt,jdbcType=VARCHAR},
|
|
|
- commit_time = #{commitTime,jdbcType=TIMESTAMP},
|
|
|
- txt_option = #{txtOption,jdbcType=VARCHAR}
|
|
|
+ <trim suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id = #{id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ file_name = #{fileName,jdbcType=VARCHAR},
|
|
|
+ line_num = #{lineNum,jdbcType=INTEGER},
|
|
|
+ txt = #{txt,jdbcType=VARCHAR},
|
|
|
+ similar_txt = #{similarTxt,jdbcType=VARCHAR},
|
|
|
+ commit_time = #{commitTime,jdbcType=TIMESTAMP},
|
|
|
+ txt_option = #{txtOption,jdbcType=VARCHAR},
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
</mapper>
|