|
@@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="phone" column="phone" />
|
|
|
<result property="updateDate" column="update_date" />
|
|
|
<result property="certContent" column="cert_content" />
|
|
|
+ <result property="templateId" column="template_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectContractTableVo">
|
|
|
- select id, cert_type, name, code, cert_id, cert_major, issue_date, valid_term, email, phone, update_date, cert_content from contract_table
|
|
|
+ select id, cert_type, name, code, cert_id, cert_major, issue_date, valid_term, email, phone, update_date, cert_content, template_id from contract_table
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectContractTableList" parameterType="ContractTable" resultMap="ContractTableResult">
|
|
@@ -43,12 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectContractTableByCode" parameterType="String" resultMap="ContractTableResult">
|
|
|
<include refid="selectContractTableVo"/>
|
|
|
- where code = #{code}
|
|
|
+ where cert_id = #{certId}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectInfoByQuery" parameterType="QueryEntity" resultMap="ContractTableResult">
|
|
|
<include refid="selectContractTableVo"/>
|
|
|
- where code = #{certNumber} AND name = #{userName}
|
|
|
+ where cert_id = #{certNumber} AND name = #{userName}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertContractTable" parameterType="ContractTable" useGeneratedKeys="true" keyProperty="id">
|
|
@@ -65,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="phone != null">phone,</if>
|
|
|
<if test="updateDate != null">update_date,</if>
|
|
|
<if test="certContent != null">cert_content,</if>
|
|
|
+ <if test="templateId != null">template_id,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="certType != null">#{certType},</if>
|
|
@@ -78,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="phone != null">#{phone},</if>
|
|
|
<if test="updateDate != null">#{updateDate},</if>
|
|
|
<if test="certContent != null">#{certContent},</if>
|
|
|
+ <if test="templateId != null">#{templateId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -95,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="phone != null">phone = #{phone},</if>
|
|
|
<if test="updateDate != null">update_date = #{updateDate},</if>
|
|
|
<if test="certContent != null">cert_content = #{certContent},</if>
|
|
|
+ <if test="templateId != null">template_id = #{templateId},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|