<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeeplus.test.workContract.mapper.WorkContractFileMapper">

	<update id="updateStatusById">
		UPDATE work_contract_file SET filed_type = #{filedType}, filed_data = NOW()
		 <if test="filedType == '4'.toString()">
		 	,proc_ins_id = null
		 	,process_definition_id = null
		 </if>
		 WHERE del_flag = 0 AND contract_info_id = #{id}
	</update>

	<select id="selectFileByContractInfoId" resultType="com.jeeplus.test.workContract.domain.WorkContractFile">
		SELECT * FROM `work_contract_file` WHERE del_flag = 0 AND contract_info_id = #{id}
	</select>
</mapper>
