|
|
@@ -5,18 +5,19 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
|
|
|
- <result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
+ <result column="type" jdbcType="INTEGER" property="type" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
@@ -50,7 +51,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
@@ -84,15 +85,15 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
- id, company_name, aid, create_time
|
|
|
+ id, company_name, type, create_time, aid
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.CompanyLibraryExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
|
@@ -111,7 +112,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -122,7 +123,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
delete from company_library
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -131,7 +132,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
delete from company_library
|
|
|
<if test="_parameter != null">
|
|
|
@@ -142,18 +143,18 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
- insert into company_library (id, company_name, aid,
|
|
|
- create_time)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ insert into company_library (id, company_name, type,
|
|
|
+ create_time, aid)
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.CompanyLibrary">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
insert into company_library
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -163,12 +164,15 @@
|
|
|
<if test="companyName != null">
|
|
|
company_name,
|
|
|
</if>
|
|
|
- <if test="aid != null">
|
|
|
- aid,
|
|
|
+ <if test="type != null">
|
|
|
+ type,
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -177,19 +181,22 @@
|
|
|
<if test="companyName != null">
|
|
|
#{companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="aid != null">
|
|
|
- #{aid,jdbcType=VARCHAR},
|
|
|
+ <if test="type != null">
|
|
|
+ #{type,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.CompanyLibraryExample" resultType="java.lang.Long">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
select count(*) from company_library
|
|
|
<if test="_parameter != null">
|
|
|
@@ -200,7 +207,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
update company_library
|
|
|
<set>
|
|
|
@@ -210,12 +217,15 @@
|
|
|
<if test="record.companyName != null">
|
|
|
company_name = #{record.companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="record.aid != null">
|
|
|
- aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
+ <if test="record.type != null">
|
|
|
+ type = #{record.type,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="record.createTime != null">
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="record.aid != null">
|
|
|
+ aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
@@ -225,13 +235,14 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
update company_library
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
company_name = #{record.companyName,jdbcType=VARCHAR},
|
|
|
- aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
|
|
+ type = #{record.type,jdbcType=INTEGER},
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ aid = #{record.aid,jdbcType=VARCHAR}
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
|
@@ -240,19 +251,22 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
update company_library
|
|
|
<set>
|
|
|
<if test="companyName != null">
|
|
|
company_name = #{companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="aid != null">
|
|
|
- aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ <if test="type != null">
|
|
|
+ type = #{type,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -260,17 +274,18 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 11 15:36:42 CST 2020.
|
|
|
+ This element was generated on Thu Sep 03 09:21:51 CST 2020.
|
|
|
-->
|
|
|
update company_library
|
|
|
set company_name = #{companyName,jdbcType=VARCHAR},
|
|
|
- aid = #{aid,jdbcType=VARCHAR},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ type = #{type,jdbcType=INTEGER},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ aid = #{aid,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
<insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.CompanyLibrary" useGeneratedKeys="true">
|
|
|
- insert into company_library
|
|
|
+ insert into company_library
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
id,
|
|
|
@@ -278,9 +293,15 @@
|
|
|
<if test="companyName != null">
|
|
|
company_name,
|
|
|
</if>
|
|
|
+ <if test="type != null">
|
|
|
+ type,
|
|
|
+ </if>
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -289,9 +310,15 @@
|
|
|
<if test="companyName != null">
|
|
|
#{companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="type != null">
|
|
|
+ #{type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<selectKey keyProperty="id" order="AFTER" resultType="int">
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
@@ -305,6 +332,7 @@
|
|
|
|
|
|
<select id="selectVague" resultType="com.goafanti.common.model.CompanyLibrary">
|
|
|
select id,company_name companyName from company_library
|
|
|
- where company_name like concat('%',#{companyName,jdbcType=VARCHAR},'%')
|
|
|
+ where company_name like concat('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ and type= #{type}
|
|
|
</select>
|
|
|
</mapper>
|