|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="abbreviation" jdbcType="VARCHAR" property="abbreviation" />
|
|
<result column="abbreviation" jdbcType="VARCHAR" property="abbreviation" />
|
|
@@ -13,12 +13,13 @@
|
|
|
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
|
|
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
|
|
|
<result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
<result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
|
+ <result column="year" jdbcType="INTEGER" property="year" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
<sql id="Example_Where_Clause">
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
<where>
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
@@ -52,7 +53,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
<where>
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
@@ -86,15 +87,15 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
- id, abbreviation, used_order_no, contract_no, aid, create_time
|
|
|
|
|
|
|
+ id, abbreviation, used_order_no, contract_no, aid, create_time, year
|
|
|
</sql>
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.IdleContractNoExample" resultMap="BaseResultMap">
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.IdleContractNoExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
select
|
|
select
|
|
|
<if test="distinct">
|
|
<if test="distinct">
|
|
@@ -113,7 +114,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
select
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
<include refid="Base_Column_List" />
|
|
@@ -124,7 +125,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
delete from idle_contract_no
|
|
delete from idle_contract_no
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
@@ -133,7 +134,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
delete from idle_contract_no
|
|
delete from idle_contract_no
|
|
|
<if test="_parameter != null">
|
|
<if test="_parameter != null">
|
|
@@ -144,20 +145,20 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
insert into idle_contract_no (id, abbreviation, used_order_no,
|
|
insert into idle_contract_no (id, abbreviation, used_order_no,
|
|
|
- contract_no, aid, create_time
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ contract_no, aid, create_time,
|
|
|
|
|
+ year)
|
|
|
values (#{id,jdbcType=INTEGER}, #{abbreviation,jdbcType=VARCHAR}, #{usedOrderNo,jdbcType=VARCHAR},
|
|
values (#{id,jdbcType=INTEGER}, #{abbreviation,jdbcType=VARCHAR}, #{usedOrderNo,jdbcType=VARCHAR},
|
|
|
- #{contractNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ #{contractNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{year,jdbcType=INTEGER})
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.IdleContractNo">
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.IdleContractNo">
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
insert into idle_contract_no
|
|
insert into idle_contract_no
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -179,6 +180,9 @@
|
|
|
<if test="createTime != null">
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
create_time,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="year != null">
|
|
|
|
|
+ year,
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
<if test="id != null">
|
|
@@ -199,13 +203,16 @@
|
|
|
<if test="createTime != null">
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="year != null">
|
|
|
|
|
+ #{year,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.IdleContractNoExample" resultType="java.lang.Long">
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.IdleContractNoExample" resultType="java.lang.Long">
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
select count(*) from idle_contract_no
|
|
select count(*) from idle_contract_no
|
|
|
<if test="_parameter != null">
|
|
<if test="_parameter != null">
|
|
@@ -216,7 +223,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
update idle_contract_no
|
|
update idle_contract_no
|
|
|
<set>
|
|
<set>
|
|
@@ -238,6 +245,9 @@
|
|
|
<if test="record.createTime != null">
|
|
<if test="record.createTime != null">
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="record.year != null">
|
|
|
|
|
+ year = #{record.year,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
</set>
|
|
</set>
|
|
|
<if test="_parameter != null">
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
@@ -247,7 +257,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
update idle_contract_no
|
|
update idle_contract_no
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
@@ -255,7 +265,8 @@
|
|
|
used_order_no = #{record.usedOrderNo,jdbcType=VARCHAR},
|
|
used_order_no = #{record.usedOrderNo,jdbcType=VARCHAR},
|
|
|
contract_no = #{record.contractNo,jdbcType=VARCHAR},
|
|
contract_no = #{record.contractNo,jdbcType=VARCHAR},
|
|
|
aid = #{record.aid,jdbcType=VARCHAR},
|
|
aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ year = #{record.year,jdbcType=INTEGER}
|
|
|
<if test="_parameter != null">
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
</if>
|
|
@@ -264,7 +275,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
update idle_contract_no
|
|
update idle_contract_no
|
|
|
<set>
|
|
<set>
|
|
@@ -283,6 +294,9 @@
|
|
|
<if test="createTime != null">
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="year != null">
|
|
|
|
|
+ year = #{year,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
</update>
|
|
@@ -290,19 +304,20 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Sep 30 16:05:16 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jan 07 16:15:44 CST 2020.
|
|
|
-->
|
|
-->
|
|
|
update idle_contract_no
|
|
update idle_contract_no
|
|
|
set abbreviation = #{abbreviation,jdbcType=VARCHAR},
|
|
set abbreviation = #{abbreviation,jdbcType=VARCHAR},
|
|
|
used_order_no = #{usedOrderNo,jdbcType=VARCHAR},
|
|
used_order_no = #{usedOrderNo,jdbcType=VARCHAR},
|
|
|
contract_no = #{contractNo,jdbcType=VARCHAR},
|
|
contract_no = #{contractNo,jdbcType=VARCHAR},
|
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ year = #{year,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
</update>
|
|
|
<select id="selectByAbbreviation" resultType="com.goafanti.common.model.IdleContractNo">
|
|
<select id="selectByAbbreviation" resultType="com.goafanti.common.model.IdleContractNo">
|
|
|
select a.id,a.abbreviation,a.used_order_no usedOrderNo,a.aid,a.create_time createTime,a.contract_no contractNo from idle_contract_no a
|
|
select a.id,a.abbreviation,a.used_order_no usedOrderNo,a.aid,a.create_time createTime,a.contract_no contractNo from idle_contract_no a
|
|
|
- where abbreviation= #{abbreviation,jdbcType=VARCHAR}
|
|
|
|
|
- and a.contract_no=(select max(contract_no)from idle_contract_no where abbreviation= #{abbreviation,jdbcType=VARCHAR})
|
|
|
|
|
|
|
+ where abbreviation= #{abbreviation,jdbcType=VARCHAR} and `year`= #{year ,jdbcType=INTEGER}
|
|
|
|
|
+ and a.contract_no=(select max(contract_no)from idle_contract_no where abbreviation= #{abbreviation,jdbcType=VARCHAR} and `year`= #{year ,jdbcType=INTEGER})
|
|
|
</select>
|
|
</select>
|
|
|
</mapper>
|
|
</mapper>
|