|
|
@@ -23,11 +23,13 @@
|
|
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
<result column="complete_date" property="completeDate" jdbcType="TIMESTAMP" />
|
|
|
<result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
|
|
|
+ <result column="contacts" property="contacts" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, uid, serial_number, name, type, sign_date, founder, describe, status, patent_num,
|
|
|
patent_status, copyright_num, copyright_status, cognizance_year, cognizance_status,
|
|
|
- tech_project_num, tech_project_status, comment, create_time, complete_date, deleted_sign
|
|
|
+ tech_project_num, tech_project_status, comment, create_time, complete_date, deleted_sign,
|
|
|
+ contacts
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
select
|
|
|
@@ -46,7 +48,7 @@
|
|
|
patent_num, patent_status, copyright_num,
|
|
|
copyright_status, cognizance_year, cognizance_status,
|
|
|
tech_project_num, tech_project_status, comment,
|
|
|
- create_time, complete_date, deleted_sign
|
|
|
+ create_time, complete_date, deleted_sign, contacts
|
|
|
)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER},
|
|
|
#{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{signDate,jdbcType=TIMESTAMP},
|
|
|
@@ -54,7 +56,8 @@
|
|
|
#{patentNum,jdbcType=INTEGER}, #{patentStatus,jdbcType=INTEGER}, #{copyrightNum,jdbcType=INTEGER},
|
|
|
#{copyrightStatus,jdbcType=INTEGER}, #{cognizanceYear,jdbcType=INTEGER}, #{cognizanceStatus,jdbcType=INTEGER},
|
|
|
#{techProjectNum,jdbcType=INTEGER}, #{techProjectStatus,jdbcType=INTEGER}, #{comment,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{completeDate,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=INTEGER}
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{completeDate,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=INTEGER},
|
|
|
+ #{contacts,jdbcType=INTEGER}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.Contract" >
|
|
|
@@ -123,6 +126,9 @@
|
|
|
<if test="deletedSign != null" >
|
|
|
deleted_sign,
|
|
|
</if>
|
|
|
+ <if test="contacts != null" >
|
|
|
+ contacts,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
@@ -188,6 +194,9 @@
|
|
|
<if test="deletedSign != null" >
|
|
|
#{deletedSign,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="contacts != null" >
|
|
|
+ #{contacts,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Contract" >
|
|
|
@@ -253,6 +262,9 @@
|
|
|
<if test="deletedSign != null" >
|
|
|
deleted_sign = #{deletedSign,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="contacts != null" >
|
|
|
+ contacts = #{contacts,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -277,7 +289,8 @@
|
|
|
comment = #{comment,jdbcType=VARCHAR},
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
complete_date = #{completeDate,jdbcType=TIMESTAMP},
|
|
|
- deleted_sign = #{deletedSign,jdbcType=INTEGER}
|
|
|
+ deleted_sign = #{deletedSign,jdbcType=INTEGER},
|
|
|
+ contacts = #{contacts,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
@@ -285,7 +298,7 @@
|
|
|
select c.id, c.uid, oi.unit_name as unitName,
|
|
|
oi.licence_province as province, c.serial_number as serialNumber, c.type,
|
|
|
c.sign_date as signDate, a.name as founder,
|
|
|
- c.describe, c.status, c.complete_date as completeDate
|
|
|
+ c.describe, c.status, c.complete_date as completeDate, c.contacts
|
|
|
from contract c
|
|
|
LEFT JOIN organization_identity oi on oi.uid = c.uid
|
|
|
LEFT JOIN admin a on a.id = c.founder
|
|
|
@@ -299,9 +312,12 @@
|
|
|
<if test="serialNumber !=null">
|
|
|
and c.serialNumber = #{serialNumber,jdbcType=VARCAHR}
|
|
|
</if>
|
|
|
- <if test="type !=null">
|
|
|
+ <if test="type !=null">
|
|
|
and c.type = #{type,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
+ <if test="uid !=null">
|
|
|
+ and c.uid = #{uid,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
<if test="status !=null">
|
|
|
and c.status= #{status ,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -345,6 +361,9 @@
|
|
|
<if test="type !=null">
|
|
|
and c.type = #{type,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
+ <if test="uid !=null">
|
|
|
+ and c.uid = #{uid,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
<if test="status !=null">
|
|
|
and c.status= #{status ,jdbcType=INTEGER}
|
|
|
</if>
|